@kastlesystems/react-native-kastlesdk
v4.1.17
Published
Kastle SDK React Native Bridge
Readme
Kastle systems -> react-native-kastlesdk
Installation
Need to take clone this plugin-module's repo
@https://bitbucket.org/kastlesystems/react-native-kastlesdk.gitMove to plugin-module folder in the terminal and install node_modules using the following command
npm installNeed to take clone this Application's repo (React-Native Project)
https://bitbucket.org/kastlesystems/kastlesdkreactnativetestappIf react-native-kastlesdk is already added then we have to remove using the following command
yarn remove @kastlesystems/react-native-kastlesdkOR
npx react-native uninstall @kastlesystems/react-native-kastlesdkthen
cd iospod installIf react-native-kastlesdk not installed or already uninstalled then we have to install it using the following commands
yarn add <local_path_of_react-native-kastlesdk>OR
npx react-native install <local_path_of_react-native-kastlesdk>npx react-native link react-native-kastlesdk[optional - if autolinking fails then need to use this command]After completion of above steps need to install node_modules using the following command
yarn installNeed to install pod from the ios side
cd iospod install[in case of error - 'out of date pod'] run command 'pod install --repo-update'
[in case of error - CocoaPods could not find compatible versions for pod...] a.) remove pod.lock file b.) run command 'pod install
[in case of error -undefined method `__apply_Xcode_12_5_M1_post_install_workaround' for #Pod::Podfile:0x00007f83e80d3220 .... ] If You don't use M1 based computer to build, You can comment "__apply_Xcode_12_5_M1_post_install_workaround(installer)" line in Your Podfile. then run 'pod install'
Need to start metro using the following command
yarn startTo run app in Android use the following command
yarn run androidTo run app in iOS use the following command
yarn run iosNeed to enable Thread Sanitizer from Xcode Edit scheme by using below flow while integrating react-native-kastlesdk plugin-module to new application.
open Application in Xcode => Edit Scheme => Run => Diagnostics => enable Thread sanitizer
Note
1. if error - [No visible @interface for 'RCTBundleURLProvider' declares the selector 'jsBundleURLForBundleRoot:fallbackResource:'] in xcode project in Appdelegate file on iOS platform the following method need to be updated (or vice versa 2.1 <-> 2.2)
2.1 remove line - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
2.2 add line - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#### make sure to install npm_modules in Application and Plugin both and pod install (using above installation steps)- Steps to install the private Kastle React SDK plugin:
Login into NPM in your local system using the below command in the terminal:
npm login --scope=@kastlesystems --auth-type=legacy --registry=https://registry.npmjs.org/
Username: npm account user name
Password: npm account password
email: npm account email
after login now call yarn add @kastlesystems/react-native-kastlesdk
Usage
import { kastleService } from 'react-native-kastlesdk';
kastleService.validateUser(
option,
(error) => {
console.log(error);
},
(success) => {
console.log(success);
}
);License
MIT
