Installation
React-Native Installation
Supported Platforms
The library is available for the following React Native (0.87+) platforms:
- Android 7.0 (API 24) and newer
- iOS 15.1 and newer
How To Install
1. Install the package via npm
npm i react-native-powerauth-mobile-sdk --save
2. Configure iOS dependencies
CocoaPods remains the default and supported React Native integration. Install the pods:
cd ios
pod install
React Native 0.87 also provides experimental, opt-in Swift Package Manager support. To try it instead of CocoaPods, run this once from the application root:
npx react-native spm --deintegrate
After a fresh clone and in CI, restore the generated SwiftPM integration before building:
npx react-native spm
SwiftPM commands and generated layouts may change in future React Native releases, so do not use this integration in production yet. The SDK supplies its native PowerAuth2 dependency automatically; do not add the package manually.
3. Import PowerAuth in your js/ts files
import { PowerAuth, PowerAuthAuthentication, PowerAuthError } from 'react-native-powerauth-mobile-sdk';
Cordova Installation
Supported Platforms
The library is available for the following Apache Cordova (>=12.0.0) platforms:
- Android 7.0 (API 24) and newer (cordova-android version >=12.0.0)
- iOS 13.0 and newer (cordova-ios version >=7.0.0)
How To Install
1. Install the plugin via the cordova plugin installer
cordova plugin add cordova-powerauth-mobile-sdk
2. Install pods for iOS (if needed)
To make integration working with iOS, you might need to install Pods:
cd platforms/ios
pod install
3. Start using PowerAuth classes
const powerAuth = new PowerAuth("my-test-instance");