-
-
Save rodgomesc/9929c1e536097e3eaf97d5f812cfcfd6 to your computer and use it in GitHub Desktop.
Use RocketSim Network Monitoring with both React Native CLI generated and Expo projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // imports... | |
| @interface RocketSimLoader : NSObject | |
| - (void)loadRocketSimConnect; | |
| @end | |
| @implementation RocketSimLoader | |
| - (void)loadRocketSimConnect { | |
| #if DEBUG | |
| NSString *frameworkPath = @"/Applications/RocketSim.app/Contents/Frameworks/RocketSimConnectLinker.nocache.framework"; | |
| NSBundle *frameworkBundle = [NSBundle bundleWithPath:frameworkPath]; | |
| NSError *error = nil; | |
| if (![frameworkBundle loadAndReturnError:&error]) { | |
| NSLog(@"Failed to load linker framework: %@", error); | |
| return; | |
| } | |
| NSLog(@"RocketSim Connect successfully linked"); | |
| #endif | |
| } | |
| @end | |
| @implementation AppDelegate | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| RocketSimLoader *loader = [[RocketSimLoader alloc] init]; | |
| [loader loadRocketSimConnect]; | |
| // code ... | |
| return [super application:application didFinishLaunchingWithOptions:launchOptions]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment