<commit_before>## react-native-sinch-verification

Sinch Verification for react native. http://www.sinch.com

### Installation

#### IOS
1. `npm install react-native-sinch-verification`
2. In the XCode's "Project navigator", right click on project name folder ➜ `Add Files to <...>`
 - Ensure `Copy items if needed` and `Create groups` are checked
3. Go to `node_modules` ➜ `react-native-sinch-verification` ➜ add `SinchVerificationIOS` folder
4. Add the dependency frameworks as described [here](https://www.sinch.com/docs/verification/ios#addthesinchverificationframework) (The `SinchVerication.framework` can be found in this package, under the `SinchVericationSDK` folder)

#### Android
1. `npm install react-native-sinch-verification`
2. `rnpm link react-native-sinch-verification` - (run `npm install -g rnpm` if required)
3. require the permissions as specified [here](https://www.sinch.com/docs/verification/android/#permissions)

### Usage

```javascript
var SinchVerification = require('react-native-sinch-verification');

// sms verification
SinchVerification.sms('your-phone-number-without-country-code', (err, res) => {
  if (!err) {
      // for android, verification is done, because the sms has ben read automatically
      // for ios, this means the sms has been sent out, you need to call verify with the received code
  }
});

// verify the received code (not needed on android)
SinchVerification.verify('the-received-code', (err, res) => {
  if (!err) {
      // done!
  }
});

// flash call verification (android only)
SinchVerification.flashCall('your-phone-number-without-country-code', (err, res) => {
  if (!err) {
      // done!
  }
});

```<commit_msg>Doc about the custom string<commit_after>## react-native-sinch-verification

Sinch Verification for react native. http://www.sinch.com

### Installation

#### IOS
1. `npm install react-native-sinch-verification`
2. In the XCode's "Project navigator", right click on project name folder ➜ `Add Files to <...>`
 - Ensure `Copy items if needed` and `Create groups` are checked
3. Go to `node_modules` ➜ `react-native-sinch-verification` ➜ add `SinchVerificationIOS` folder
4. Add the dependency frameworks as described [here](https://www.sinch.com/docs/verification/ios#addthesinchverificationframework) (The `SinchVerication.framework` can be found in this package, under the `SinchVericationSDK` folder)

#### Android
1. `npm install react-native-sinch-verification`
2. `rnpm link react-native-sinch-verification` - (run `npm install -g rnpm` if required)
3. require the permissions as specified [here](https://www.sinch.com/docs/verification/android/#permissions)

### Usage

```javascript
var SinchVerification = require('react-native-sinch-verification');
var custom = "A custom string to be sent to your server backend, through Sinch's callback URL";

// sms verification
SinchVerification.sms('your-phone-number-without-country-code', custom, (err, res) => {
  if (!err) {
      // for android, verification is done, because the sms has ben read automatically
      // for ios, this means the sms has been sent out, you need to call verify with the received code
  }
});

// verify the received code (not needed on android)
SinchVerification.verify('the-received-code', (err, res) => {
  if (!err) {
      // done!
  }
});

// flash call verification (android only)
SinchVerification.flashCall('your-phone-number-without-country-code', custom, (err, res) => {
  if (!err) {
      // done!
  }
});

```
{'fraction_non_alphanumeric': 0.13260619977037888, 'fraction_numerical': 0.004018369690011481, 'mean_word_length': 4.264350453172206, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, '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': '4371885', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1067, 'n_words': 344}