framepayments-react-native 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/FrameSDKBridge.swift +17 -6
- package/package.json +1 -1
package/ios/FrameSDKBridge.swift
CHANGED
|
@@ -192,15 +192,26 @@ public class FrameSDKBridge: NSObject {
|
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
)
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
// Embed in a UINavigationController so the outer sheet is a UIKit container,
|
|
196
|
+
// not a SwiftUI-bridged one. On iOS 18, presenting the UIHostingController
|
|
197
|
+
// directly causes SwiftUI's SheetBridge to call dismiss on the host whenever
|
|
198
|
+
// a nested .sheet() inside the onboarding flow toggles its binding (its
|
|
199
|
+
// preferencesDidChange propagates up to the outer bridge). The nav
|
|
200
|
+
// controller breaks that propagation. Nav bar is hidden so the sheet looks
|
|
201
|
+
// identical to before.
|
|
202
|
+
let nav = UINavigationController(rootViewController: hosting)
|
|
203
|
+
nav.setNavigationBarHidden(true, animated: false)
|
|
204
|
+
nav.modalPresentationStyle = UIModalPresentationStyle.pageSheet
|
|
205
|
+
if let sheet = nav.sheetPresentationController {
|
|
197
206
|
sheet.detents = [UISheetPresentationController.Detent.large()]
|
|
198
207
|
}
|
|
199
208
|
delegate = OnboardingDismissDelegate(resolve: resolve)
|
|
200
|
-
delegate.hostingController =
|
|
201
|
-
objc_setAssociatedObject(
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
delegate.hostingController = nav
|
|
210
|
+
objc_setAssociatedObject(nav, &onboardingDismissKey, delegate, .OBJC_ASSOCIATION_RETAIN)
|
|
211
|
+
NSLog("[FrameRN][onb] presenting OnboardingHostingController (wrapped in UINavigationController) from \(type(of: top))")
|
|
212
|
+
top.present(nav, animated: true) {
|
|
213
|
+
nav.presentationController?.delegate = delegate
|
|
214
|
+
NSLog("[FrameRN][onb] presentation completed; presentationController=\(String(describing: nav.presentationController)) delegate set")
|
|
204
215
|
}
|
|
205
216
|
}
|
|
206
217
|
}
|
package/package.json
CHANGED