You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the app. At this point, the PassioPlatformSDK is exposed to React Native as NativeModules.PassioPlatformSDK. But none of the functions are exposed yet.
To expose a function, you will need to add a wrapper function in PassioPlatformSDKBridge.swift and expose it with RCT_EXTERN_METHOD in PassioPlatformSDKBridge.m
For reference, this sample app has implemented PassioPlatformSDKBridge.swift, PassioPlatformSDKBridge.m, PassioCameraView, PassioCameraViewManager, and App.tsx
Steps to integrate PassioPlatformSDK for Android on a blank React Native project
Open the android folder with Android Studio app.
Create a new Android Resource Directory assets in the app.
Edit MainApplication.java to register the package:
...
@OverrideprotectedList<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = newPackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:packages.add(newPassioPlatformSDKBridge());
returnpackages;
}
...
Run the app. At this point, the PassioPlatformSDK is exposed to React Native as NativeModules.PassioPlatformSDK. But none of the functions are exposed yet.
To expose a function, you will need to expose the function in PassioPlatformSDKBridgeModule.kt.
For reference, this sample app has implemented PassioPlatformSDKBridgeModule.kt, PassioPlatformSDKBridge.kt, PassioCameraView, PassioCameraViewManager, and App.tsx