From aee51d5dfb14814b1ce6c0caecc07f5f50017b83 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Sat, 25 Apr 2020 22:59:53 +0200 Subject: [PATCH] Removed expo updates specific ios code --- ios/Campus/AppDelegate.h | 4 +--- ios/Campus/AppDelegate.m | 35 +++++--------------------------- ios/Campus/Supporting/Expo.plist | 10 --------- 3 files changed, 6 insertions(+), 43 deletions(-) delete mode 100644 ios/Campus/Supporting/Expo.plist diff --git a/ios/Campus/AppDelegate.h b/ios/Campus/AppDelegate.h index 080b9a0..78fbb4d 100644 --- a/ios/Campus/AppDelegate.h +++ b/ios/Campus/AppDelegate.h @@ -10,9 +10,7 @@ #import #import -#import - -@interface AppDelegate : UMAppDelegateWrapper +@interface AppDelegate : UMAppDelegateWrapper @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter; @property (nonatomic, strong) UIWindow *window; diff --git a/ios/Campus/AppDelegate.m b/ios/Campus/AppDelegate.m index 2ca9c1c..89be977 100644 --- a/ios/Campus/AppDelegate.m +++ b/ios/Campus/AppDelegate.m @@ -14,12 +14,6 @@ #import #import -@interface AppDelegate () - -@property (nonatomic, strong) NSDictionary *launchOptions; - -@end - @implementation AppDelegate @synthesize window = _window; @@ -27,34 +21,20 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]]; - self.launchOptions = launchOptions; - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; -#ifdef DEBUG - [self initializeReactNativeApp]; -#else - EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance]; - controller.delegate = self; - [controller startAndShowLaunchScreen:self.window]; -#endif - - [super application:application didFinishLaunchingWithOptions:launchOptions]; - - return YES; -} - -- (RCTBridge *)initializeReactNativeApp -{ RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" 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]; - return bridge; + [super application:application didFinishLaunchingWithOptions:launchOptions]; + + return YES; } - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge @@ -69,13 +49,8 @@ #ifdef DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else - return [[EXUpdatesAppController sharedInstance] launchAssetUrl]; + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif } -- (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success -{ - appController.bridge = [self initializeReactNativeApp]; -} - @end diff --git a/ios/Campus/Supporting/Expo.plist b/ios/Campus/Supporting/Expo.plist deleted file mode 100644 index 03410dc..0000000 --- a/ios/Campus/Supporting/Expo.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - EXUpdatesSDKVersion - YOUR-APP-SDK-VERSION-HERE - EXUpdatesURL - YOUR-APP-URL-HERE - -