11import UIKit
22import React
3- import React_RCTAppDelegate
4- import ReactAppDependencyProvider
53import MendixNative
64
75@main
8- class AppDelegate : RCTAppDelegate {
6+ class AppDelegate : ReactAppProvider {
97
108 override func application( _ application: UIApplication , didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? = nil ) -> Bool {
119
12- self . moduleName = " App "
13- self . dependencyProvider = RCTAppDependencyProvider ( )
14- self . initialProps = [ : ]
15- super. application ( application, didFinishLaunchingWithOptions: launchOptions)
16-
17- //Start - For MendixApplication compatibility only, not part of React Native template
1810 SessionCookieStore . restore ( )
11+ setUpProvider ( )
1912
2013 guard let bundleUrl = bundleURL ( ) else {
2114 let message = " No script URL provided. Make sure the metro packager is running or you have embedded a JS bundle in your application bundle. "
2215 NativeErrorHandler ( ) . handle ( message: message, stackTrace: [ ] )
2316 return false
2417 }
2518
26- MxConfiguration . update ( from :
19+ ReactNative . shared . setup (
2720 MendixApp . init (
2821 identifier: nil ,
2922 bundleUrl: bundleUrl,
@@ -34,17 +27,18 @@ class AppDelegate: RCTAppDelegate {
3427 splashScreenPresenter: nil ,
3528 reactLoading: nil ,
3629 enableThreeFingerGestures: false
37- )
30+ ) ,
31+ launchOptions: launchOptions
3832 )
39- //End - For MendixApplication compatibility only, not part of React Native template
40- return true
33+ ReactNative . shared . start ( )
34+ return super . application ( application , didFinishLaunchingWithOptions : launchOptions )
4135 }
4236
43- override func applicationDidEnterBackground( _ application: UIApplication ) {
37+ func applicationDidEnterBackground( _ application: UIApplication ) {
4438 SessionCookieStore . persist ( )
4539 }
4640
47- override func applicationWillTerminate( _ application: UIApplication ) {
41+ func applicationWillTerminate( _ application: UIApplication ) {
4842 SessionCookieStore . persist ( )
4943 }
5044
0 commit comments