React Native module with FHP
npm install react-native-module-fhp-ios
Add to the project android/build.gradle
file:
apply from: "../node_modules/react-native-module-fhp-ios/android/fhp.gradle"
import { setLogURL, enableDebugLogs, setCustomerId, run, setTargetURL, enableCapability, Capability, disableCapability, stop } from 'react-native-module-fhp-ios';
// ...
enableDebugLogs();
setCustomerId("react-native-i", (error: any) => {
console.log(error);
});
setTargetURL("https://group-ib.com", (error: any) => {
console.log(error);
});
enableCapability(Capability.Swizzle, (error: any, isRun: Boolean) => {
if (error) {
console.log(error);
}
console.log("Capability run status " + isRun);
});
run((error: any) => {
console.log("Run error console");
console.log(error);
});