@@ -5,13 +5,10 @@ public protocol ReactNativeDelegateInternal: AnyObject {
55 func onAppClosed( )
66}
77
8- @objcMembers
98open class ReactNative : NSObject , RCTReloadListener {
109 // MARK: - Properties
1110 private var mendixApp : MendixApp ?
1211 private var bundleUrl : URL ?
13- private var mendixOTAEnabled : Bool = false
14- private var tapGestureHelper : TapGestureRecognizerHelper ?
1512
1613 public weak var delegate : ReactNativeDelegateInternal ?
1714
@@ -23,10 +20,9 @@ open class ReactNative: NSObject, RCTReloadListener {
2320 }
2421
2522 // MARK: - Setup Methods
26- public func setup( _ mendixApp: MendixApp , launchOptions: [ AnyHashable : Any ] ? = nil , mendixOTAEnabled : Bool = false ) {
23+ public func setup( _ mendixApp: MendixApp , launchOptions: [ AnyHashable : Any ] ? = nil ) {
2724 self . mendixApp = mendixApp
2825 self . bundleUrl = mendixApp. bundleUrl
29- self . mendixOTAEnabled = mendixOTAEnabled
3026
3127 if let host = bundleUrl? . host, let port = bundleUrl? . port {
3228 let jsLocation = " \( host) : \( port) "
@@ -68,9 +64,7 @@ open class ReactNative: NSObject, RCTReloadListener {
6864
6965 // MARK: - Splash Screen Methods
7066 public func showSplashScreen( ) {
71- if MendixBackwardsCompatUtility . isHideSplashScreenInClientSupported ( ) {
72- mendixApp? . splashScreenPresenter? . show ( ReactAppProvider . shared ( ) ? . rootView)
73- }
67+ mendixApp? . splashScreenPresenter? . show ( ReactAppProvider . shared ( ) ? . rootView)
7468 }
7569
7670 public func hideSplashScreen( ) {
@@ -80,33 +74,15 @@ open class ReactNative: NSObject, RCTReloadListener {
8074
8175 // MARK: - Reload Methods
8276 public func reload( ) {
83- guard let mendixApp = mendixApp else { return }
77+ guard mendixApp != nil else { return }
8478
8579 // Note: under the New Architecture the bundle URL is resolved fresh in bundleURL(),
8680 // which RCTHost re-invokes on reload. RCTReloadCommandSetBundleURL is a legacy-bridge
8781 // mechanism that the bridgeless host ignores, so it is intentionally not used here.
8882
89- if mendixApp. isDeveloperApp {
90- let runtimeInfoUrl = AppUrl . forRuntimeInfo ( mendixApp. runtimeUrl. absoluteString)
91- RuntimeInfoProvider . getRuntimeInfo ( runtimeInfoUrl) { [ weak self] response in
92- if response. status == " SUCCESS " , let version = response. runtimeInfo? . version {
93- MendixBackwardsCompatUtility . update ( version)
94- }
95- self ? . reloadWithBridge ( )
96- }
97- } else {
98- reloadWithBridge ( )
99- }
100- }
101-
102- private func reloadWithBridge( ) {
10383 RCTTriggerReloadCommandListeners ( " Reload command from app " )
10484 }
10585
106- public func reloadWithState( ) {
107- ReactHostHelper ( ) . reloadClientWithState ( )
108- }
109-
11086 // MARK: - RCTReloadListener
11187 @objc public func didReceiveReloadCommand( ) {
11288 showSplashScreen ( )
@@ -129,28 +105,6 @@ open class ReactNative: NSObject, RCTReloadListener {
129105 remoteDebugging ( true )
130106 }
131107
132- // MARK: - Gesture Recognition
133- private func attachThreeFingerGestures( to window: UIWindow ) {
134- tapGestureHelper? . attach ( )
135- }
136-
137- private func removeThreeFingerGestures( from window: UIWindow ) {
138- tapGestureHelper? . remove ( )
139- window. motionBegan ( . motionShake, with: nil )
140- }
141-
142- @objc private func appReloadAction( _ gestureRecognizer: UITapGestureRecognizer ) {
143- if gestureRecognizer. state == . ended && ReactAppProvider . isReactAppActive ( ) == true {
144- reloadWithState ( )
145- }
146- }
147-
148- // MARK: - Legacy Methods (for compatibility)
149- func useCodePush( ) -> Bool {
150- // Implementation depends on your specific CodePush setup
151- return false
152- }
153-
154108 public func bundleURL( ) -> URL ? {
155109 // New Architecture (Bridgeless): RCTHost re-invokes this provider block on every
156110 // reload (via RCTRootViewFactory's bundleURLBlock) instead of consulting the URL set
0 commit comments