<commit_before>StudyplusSDK-V2
=======

StudyplusSDK-V2 is [Studyplus iOS SDK](https://github.com/studyplus/Studyplus-iOS-SDK) for Swift.

## Requirements

 * iOS 9.0 or above
 * Swift 4.0 or above

## Dependency
 * [KeychainAccess](https://github.com/kishikawakatsumi/KeychainAccess)

## Install

### [CocoaPods](https://cocoapods.org/)
Add the following line to your Podfile:
```ruby
use_frameworks!

target 'YOUR_TARGET_NAME' do
  pod 'StudyplusSDK-V2'
end
```

### [Carthage](https://github.com/Carthage/Carthage)
Add the following line to your Cartfile:
```swift
github "studyplus/Studyplus-iOS-SDK-V2"
```

## Usage

- If you don't have consumerKey and consumerSecret, please contact https://info.studyplus.co.jp/contact/studyplus-api

### ① Set up custom URL scheme

- set __studyplus-*{your consumer key}*__ to URL Types. (ex. studyplus-MIoh79q7pfMbTUVA3BNsSeTaZRcOK3yg )

![xcode](https://github.com/studyplus/Studyplus-iOS-SDK-V2/blob/master/docs/set_url_scheme.png)

### ② Set up consumerKey and consumerSecret

- set __consumerKey__ and __consumerSecret__ in your Info.plist.

```
<key>StudyplusSDK</key>
<dict>
  <key>consumerKey</key>
  <string>set_your_consumerKey</string>
  <key>consumerSecret</key>
  <string>set_your_consumerSecret</string>
</dict>
```

### ③ Set up LSApplicationQueriesSchemes

- Set LSApplicationQueriesSchemes in your info.plist for checking if studyplus is installed.

```
<key>LSApplicationQueriesSchemes</key>
  <array>
    <string>studyplus</string>
  </array>
```

### Initialize

```Swift

// when carthage is StudyplusSDK, cocoapods is StudyplusSDK_V2
import StudyplusSDK_V2

class ViewController: UIViewController, StudyplusLoginDelegate {<commit_msg>fix indent<commit_after>StudyplusSDK-V2
=======

StudyplusSDK-V2 is [Studyplus iOS SDK](https://github.com/studyplus/Studyplus-iOS-SDK) for Swift.

## Requirements

 * iOS 9.0 or above
 * Swift 4.0 or above

## Dependency
 * [KeychainAccess](https://github.com/kishikawakatsumi/KeychainAccess)

## Install

### [CocoaPods](https://cocoapods.org/)
Add the following line to your Podfile:
```ruby
use_frameworks!

target 'YOUR_TARGET_NAME' do
  pod 'StudyplusSDK-V2'
end
```

### [Carthage](https://github.com/Carthage/Carthage)
Add the following line to your Cartfile:
```swift
github "studyplus/Studyplus-iOS-SDK-V2"
```

## Usage

- If you don't have consumerKey and consumerSecret, please contact https://info.studyplus.co.jp/contact/studyplus-api

### ① Set up custom URL scheme

- set __studyplus-*{your consumer key}*__ to URL Types. (ex. studyplus-MIoh79q7pfMbTUVA3BNsSeTaZRcOK3yg )

![xcode](https://github.com/studyplus/Studyplus-iOS-SDK-V2/blob/master/docs/set_url_scheme.png)

### ② Set up consumerKey and consumerSecret

- set __consumerKey__ and __consumerSecret__ in your Info.plist.

```
<key>StudyplusSDK</key>
<dict>
  <key>consumerKey</key>
  <string>set_your_consumerKey</string>
  <key>consumerSecret</key>
  <string>set_your_consumerSecret</string>
</dict>
```

### ③ Set up LSApplicationQueriesSchemes

- Set LSApplicationQueriesSchemes in your info.plist for checking if studyplus is installed.

```
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>studyplus</string>
</array>
```

### Initialize

```Swift

// when carthage is StudyplusSDK, cocoapods is StudyplusSDK_V2
import StudyplusSDK_V2

class ViewController: UIViewController, StudyplusLoginDelegate {
{'fraction_non_alphanumeric': 0.1328609388839681, 'fraction_numerical': 0.0094478889873044, 'mean_word_length': 5.250922509225092, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6355565', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1175, 'n_words': 257}