Skip to content

Commit bdfe6e0

Browse files
refactor: remove deprecated APIs
1 parent 72bcf30 commit bdfe6e0

5 files changed

Lines changed: 3 additions & 136 deletions

File tree

ios/Modules/Helper/ReactHostHelper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
1212
@interface ReactHostHelper : NSObject
1313

1414
- (nullable id) moduleForClass: (Class) clazz;
15-
- (void) reloadClientWithState;
1615
- (BOOL) isReactAppActive;
1716
- (void) emitEvent: (nonnull NSString*) eventName payload: (nullable id) payload;
1817

ios/Modules/Helper/ReactHostHelper.mm

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#import "RCTDefaultReactNativeFactoryDelegate.h"
1212
#import "RCTReactNativeFactory.h"
1313
#import "MendixNative-Swift.h"
14-
#import "MxReload.h"
1514

1615
NS_ASSUME_NONNULL_BEGIN
1716

@@ -44,12 +43,6 @@ - (RCTHost *) currentHost {
4443
return reactHost;
4544
}
4645

47-
48-
- (void) reloadClientWithState {
49-
MxReload *mxReload = [self moduleForClass: MxReload.class];
50-
[mxReload emitOnReloadWithState];
51-
}
52-
5346
- (BOOL)isReactAppActive {
5447
if ([NSThread isMainThread]) {
5548
return [self currentHost] != nil;

ios/Modules/MendixBackwardsCompatUtility/MendixBackwardsCompatUtility.swift

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

ios/Modules/MendixBackwardsCompatUtility/UnsupportedFeatures.swift

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

ios/Modules/ReactNative.swift

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ public protocol ReactNativeDelegateInternal: AnyObject {
55
func onAppClosed()
66
}
77

8-
@objcMembers
98
open 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

Comments
 (0)