Created
August 2, 2020 09:42
-
-
Save naishe/8f95ac9312d9f5cdadc42af45e7872f6 to your computer and use it in GitHub Desktop.
Integrating CodePush 7 (iOS 1)
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
// file name: ios/ThatMate/AppDelegate.m | |
#import <React/RCTBundleURLProvider.h> | |
#import <React/RCTRootView.h> | |
+#import <CodePush/CodePush.h> // CodePush | |
// --- code not shown for brevity --- | |
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { | |
- #ifdef FB_SONARKIT_ENABLED | |
- return | |
- [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" | |
- fallbackResource:nil]; | |
-#else | |
- return [[NSBundle mainBundle] URLForResource:@"main" | |
- withExtension:@"jsbundle"]; | |
-#endif | |
+ #if DEBUG | |
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; | |
+ #else | |
+ return [CodePush bundleURL]; | |
+ #endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment