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