Skip to content

Commit d09a548

Browse files
committed
chore: deintegrate legacy AppDelegate from helloworld
1 parent d4cab37 commit d09a548

3 files changed

Lines changed: 0 additions & 128 deletions

File tree

private/helloworld/ios/HelloWorld/AppDelegate.legacy.swift

Lines changed: 0 additions & 65 deletions
This file was deleted.

private/helloworld/ios/HelloWorld/AppDelegate.swift

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,6 @@
77

88
import UIKit
99

10-
#if HELLOWORLD_USE_APPDELEGATE
11-
12-
import React
13-
import React_RCTAppDelegate
14-
import ReactAppDependencyProvider
15-
16-
@main
17-
class AppDelegate: UIResponder, UIApplicationDelegate {
18-
var window: UIWindow?
19-
20-
var reactNativeDelegate: ReactNativeDelegate?
21-
var reactNativeFactory: RCTReactNativeFactory?
22-
23-
func application(
24-
_ application: UIApplication,
25-
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
26-
) -> Bool {
27-
let delegate = ReactNativeDelegate()
28-
let factory = RCTReactNativeFactory(delegate: delegate)
29-
delegate.dependencyProvider = RCTAppDependencyProvider()
30-
31-
reactNativeDelegate = delegate
32-
reactNativeFactory = factory
33-
34-
#if DEBUG
35-
let devMenuConfiguration = RCTDevMenuConfiguration(
36-
devMenuEnabled: true,
37-
shakeGestureEnabled: true,
38-
keyboardShortcutsEnabled: true
39-
)
40-
reactNativeFactory?.devMenuConfiguration = devMenuConfiguration
41-
#endif
42-
43-
window = UIWindow(frame: UIScreen.main.bounds)
44-
45-
factory.startReactNative(
46-
withModuleName: "HelloWorld",
47-
in: window,
48-
launchOptions: launchOptions
49-
)
50-
51-
return true
52-
}
53-
}
54-
55-
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
56-
override func bundleURL() -> URL? {
57-
#if DEBUG
58-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
59-
#else
60-
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
61-
#endif
62-
}
63-
}
64-
65-
#else
66-
6710
@main
6811
class AppDelegate: UIResponder, UIApplicationDelegate {
6912
func application(
@@ -73,5 +16,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
7316
true
7417
}
7518
}
76-
77-
#endif

private/helloworld/ios/HelloWorld/SceneDelegate.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import React_RCTAppDelegate
1010
import ReactAppDependencyProvider
1111
import UIKit
1212

13-
#if !HELLOWORLD_USE_APPDELEGATE
14-
1513
class SceneDelegate: RCTDefaultReactNativeFactoryDelegate, UIWindowSceneDelegate {
1614
var window: UIWindow?
1715
var reactNativeFactory: RCTReactNativeFactory?
@@ -61,5 +59,3 @@ class SceneDelegate: RCTDefaultReactNativeFactoryDelegate, UIWindowSceneDelegate
6159
#endif
6260
}
6361
}
64-
65-
#endif

0 commit comments

Comments
 (0)