Closed hanifmhd closed 3 years ago
Hi,
Can you help me? i got error Undefined symbol: _isSecurityCheckPassed when building iOS app. All function of JB.m is the same error undefined symbol
Undefined symbol: _isSecurityCheckPassed
JB.m
undefined symbol
isRunningOnMac(); isJb(); isInjectedWithDynamicLibrary(); isSecurityCheckPassed(); isDebugged(); isFromAppStore();
Here is my code in AppDelegate.m
AppDelegate.m
#import "JB.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if DEBUG InitializeFlipper(application); #endif RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"ABC" initialProperties:nil]; rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; [RNSplashScreen show]; // Jailbreak detection, if it is true, show alert, then exit app if (!isSecurityCheckPassed()) { UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Jailbroken device is detected" message:@"Sorry, you cannot use this app as we have detected that your device has been jailbroken." preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { exit(1); }]; [alertController addAction:cancelAction]; [self.window.rootViewController presentViewController:alertController animated:YES completion:nil]; } return YES; }
it is solved, i add manually JB.m in Build Phase -> Compile Sourcecs
Build Phase
Compile Sourcecs
Hi,
Can you help me? i got error
Undefined symbol: _isSecurityCheckPassed
when building iOS app. All function ofJB.m
is the same errorundefined symbol
Here is my code in
AppDelegate.m