Skip to content

Instantly share code, notes, and snippets.

@juanchoperezj
Last active July 4, 2024 15:44
Show Gist options
  • Save juanchoperezj/7a057c6ab1040e41abd0bde2f406e448 to your computer and use it in GitHub Desktop.
Save juanchoperezj/7a057c6ab1040e41abd0bde2f406e448 to your computer and use it in GitHub Desktop.
Use RocketSim Network Monitoring with a React Native Project (Not Expo)
// 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