Browse Source

Removed expo updates specific ios code

Arnaud Vergnet 3 years ago
parent
commit
aee51d5dfb
3 changed files with 6 additions and 43 deletions
  1. 1
    3
      ios/Campus/AppDelegate.h
  2. 5
    30
      ios/Campus/AppDelegate.m
  3. 0
    10
      ios/Campus/Supporting/Expo.plist

+ 1
- 3
ios/Campus/AppDelegate.h View File

@@ -10,9 +10,7 @@
10 10
 #import <React/RCTBridgeDelegate.h>
11 11
 #import <UMCore/UMAppDelegateWrapper.h>
12 12
 
13
-#import <EXUpdates/EXUpdatesAppController.h>
14
-
15
-@interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate, EXUpdatesAppControllerDelegate>
13
+@interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate>
16 14
 
17 15
 @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
18 16
 @property (nonatomic, strong) UIWindow *window;

+ 5
- 30
ios/Campus/AppDelegate.m View File

@@ -14,12 +14,6 @@
14 14
 #import <UMReactNativeAdapter/UMNativeModulesProxy.h>
15 15
 #import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
16 16
 
17
-@interface AppDelegate ()
18
-
19
-@property (nonatomic, strong) NSDictionary *launchOptions;
20
-
21
-@end
22
-
23 17
 @implementation AppDelegate
24 18
 
25 19
 @synthesize window = _window;
@@ -27,34 +21,20 @@
27 21
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
28 22
 {
29 23
   self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
30
-  self.launchOptions = launchOptions;
31
-
32
-  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
33
-#ifdef DEBUG
34
-  [self initializeReactNativeApp];
35
-#else
36
-  EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance];
37
-  controller.delegate = self;
38
-  [controller startAndShowLaunchScreen:self.window];
39
-#endif
40
-
41
-  [super application:application didFinishLaunchingWithOptions:launchOptions];
42 24
 
43
-  return YES;
44
-}
45
-
46
-- (RCTBridge *)initializeReactNativeApp
47
-{
48 25
   RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions];
49 26
   RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
50 27
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
51 28
 
29
+  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
52 30
   UIViewController *rootViewController = [UIViewController new];
53 31
   rootViewController.view = rootView;
54 32
   self.window.rootViewController = rootViewController;
55 33
   [self.window makeKeyAndVisible];
56 34
 
57
-  return bridge;
35
+  [super application:application didFinishLaunchingWithOptions:launchOptions];
36
+
37
+  return YES;
58 38
 }
59 39
 
60 40
 - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
@@ -69,13 +49,8 @@
69 49
 #ifdef DEBUG
70 50
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
71 51
 #else
72
-  return [[EXUpdatesAppController sharedInstance] launchAssetUrl];
52
+  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
73 53
 #endif
74 54
 }
75 55
 
76
-- (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success
77
-{
78
-  appController.bridge = [self initializeReactNativeApp];
79
-}
80
-
81 56
 @end

+ 0
- 10
ios/Campus/Supporting/Expo.plist View File

@@ -1,10 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
-        <key>EXUpdatesSDKVersion</key>
6
-        <string>YOUR-APP-SDK-VERSION-HERE</string>
7
-        <key>EXUpdatesURL</key>
8
-        <string>YOUR-APP-URL-HERE</string>
9
-</dict>
10
-</plist>

Loading…
Cancel
Save