react-native-firework-sdk 2.7.0 → 2.7.2-beta.1
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/FireworkVideoUI.xcframework/Info.plist +5 -5
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +1 -1
- package/ios/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +69 -8
- package/package.json +1 -1
- package/react-native-firework-sdk.podspec +1 -1
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>FireworkVideoUI.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
-
<string>x86_64</string>
|
|
16
15
|
</array>
|
|
17
16
|
<key>SupportedPlatform</key>
|
|
18
17
|
<string>ios</string>
|
|
19
|
-
<key>SupportedPlatformVariant</key>
|
|
20
|
-
<string>simulator</string>
|
|
21
18
|
</dict>
|
|
22
19
|
<dict>
|
|
23
20
|
<key>LibraryIdentifier</key>
|
|
24
|
-
<string>ios-
|
|
21
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
25
22
|
<key>LibraryPath</key>
|
|
26
23
|
<string>FireworkVideoUI.framework</string>
|
|
27
24
|
<key>SupportedArchitectures</key>
|
|
28
25
|
<array>
|
|
29
26
|
<string>arm64</string>
|
|
27
|
+
<string>x86_64</string>
|
|
30
28
|
</array>
|
|
31
29
|
<key>SupportedPlatform</key>
|
|
32
30
|
<string>ios</string>
|
|
31
|
+
<key>SupportedPlatformVariant</key>
|
|
32
|
+
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
</array>
|
|
35
35
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist
CHANGED
|
Binary file
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
PODS:
|
|
2
|
-
- FireworkVideo (1.
|
|
2
|
+
- FireworkVideo (1.14.0)
|
|
3
3
|
|
|
4
4
|
DEPENDENCIES:
|
|
5
|
-
- FireworkVideo (= 1.
|
|
5
|
+
- FireworkVideo (= 1.14.0)
|
|
6
6
|
|
|
7
7
|
SPEC REPOS:
|
|
8
8
|
trunk:
|
|
9
9
|
- FireworkVideo
|
|
10
10
|
|
|
11
11
|
SPEC CHECKSUMS:
|
|
12
|
-
FireworkVideo:
|
|
12
|
+
FireworkVideo: c8af446a350e2486e86c0a789ecfd4a57ce6facc
|
|
13
13
|
|
|
14
|
-
PODFILE CHECKSUM:
|
|
14
|
+
PODFILE CHECKSUM: 880bd5c72a5a81b620b803189a6ec208e8481116
|
|
15
15
|
|
|
16
16
|
COCOAPODS: 1.12.1
|
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
import UIKit
|
|
9
9
|
import FireworkVideo
|
|
10
10
|
|
|
11
|
+
private class RCTRootViewPlaceholder: UIView {
|
|
12
|
+
weak var reactViewController: UIViewController?
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private struct RCTRootViewResult {
|
|
16
|
+
weak var viewController: UIViewController?
|
|
17
|
+
weak var view: RCTRootView?
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private struct RCTRootViewPlaceholderResult {
|
|
21
|
+
weak var viewController: UIViewController?
|
|
22
|
+
weak var view: RCTRootViewPlaceholder?
|
|
23
|
+
}
|
|
24
|
+
|
|
11
25
|
private struct PlayerExitButtonInfo {
|
|
12
26
|
enum ExitButtonType: Int {
|
|
13
27
|
case close, floating
|
|
@@ -162,8 +176,10 @@ class FWNavigatorModule: RCTEventEmitter {
|
|
|
162
176
|
let containerViewController = FWRNPresentContainerViewController()
|
|
163
177
|
containerViewController.modalPresentationStyle = .fullScreen
|
|
164
178
|
|
|
165
|
-
guard let
|
|
166
|
-
let
|
|
179
|
+
guard let rootVC = RCTKeyWindow()?.rootViewController,
|
|
180
|
+
let rootViewResult = FWNavigatorModule.findRCTRootViewResult(rootVC),
|
|
181
|
+
let rootViewVC = rootViewResult.viewController,
|
|
182
|
+
let rootView = rootViewResult.view else {
|
|
167
183
|
resolver(false)
|
|
168
184
|
return
|
|
169
185
|
}
|
|
@@ -176,10 +192,17 @@ class FWNavigatorModule: RCTEventEmitter {
|
|
|
176
192
|
containerViewController.addChild(detachedController)
|
|
177
193
|
detachedController.didMove(toParent: containerViewController)
|
|
178
194
|
}
|
|
195
|
+
|
|
179
196
|
rootView.removeFromSuperview()
|
|
180
|
-
|
|
197
|
+
let placeholderView = RCTRootViewPlaceholder()
|
|
198
|
+
rootViewVC.view = placeholderView
|
|
181
199
|
containerViewController.rootView = rootView
|
|
182
200
|
presentedVC.present(containerViewController, animated: true) {
|
|
201
|
+
if rootView.reactViewController() != containerViewController {
|
|
202
|
+
// Save previous reactViewController
|
|
203
|
+
placeholderView.reactViewController = rootView.reactViewController()
|
|
204
|
+
rootView.setReactViewController(containerViewController)
|
|
205
|
+
}
|
|
183
206
|
resolver(true)
|
|
184
207
|
}
|
|
185
208
|
}
|
|
@@ -191,22 +214,30 @@ class FWNavigatorModule: RCTEventEmitter {
|
|
|
191
214
|
if let containerVC = RCTPresentedViewController() as? FWRNPresentContainerViewController,
|
|
192
215
|
let rootView = containerVC.rootView,
|
|
193
216
|
containerVC.presentingViewController != nil {
|
|
194
|
-
guard let
|
|
195
|
-
let
|
|
217
|
+
guard let rootVC = RCTKeyWindow()?.rootViewController,
|
|
218
|
+
let rootViewPlaceholderResult = FWNavigatorModule.findRCTRootViewPlaceholderResult(rootVC),
|
|
219
|
+
let rootViewPlaceholderVC = rootViewPlaceholderResult.viewController,
|
|
220
|
+
let rootViewPlaceholder = rootViewPlaceholderResult.view else {
|
|
196
221
|
resolver(false)
|
|
197
222
|
return
|
|
198
223
|
}
|
|
224
|
+
|
|
199
225
|
let childViewControllers = rootView.reactViewController()?.children
|
|
200
226
|
containerVC.dismiss(animated: true) {
|
|
201
227
|
childViewControllers?.forEach { (childViewController) in
|
|
202
228
|
let detachedController = childViewController
|
|
203
229
|
detachedController.willMove(toParent: nil)
|
|
204
230
|
detachedController.removeFromParent()
|
|
205
|
-
|
|
206
|
-
detachedController.didMove(toParent:
|
|
231
|
+
rootViewPlaceholderVC.addChild(detachedController)
|
|
232
|
+
detachedController.didMove(toParent: rootViewPlaceholderVC)
|
|
207
233
|
}
|
|
208
234
|
rootView.removeFromSuperview()
|
|
209
|
-
|
|
235
|
+
rootViewPlaceholderVC.view = rootView
|
|
236
|
+
|
|
237
|
+
if let reactViewController = rootViewPlaceholder.reactViewController {
|
|
238
|
+
// Restore previous reactViewController
|
|
239
|
+
rootView.setReactViewController(reactViewController)
|
|
240
|
+
}
|
|
210
241
|
resolver(true)
|
|
211
242
|
}
|
|
212
243
|
} else {
|
|
@@ -272,6 +303,36 @@ extension FWNavigatorModule {
|
|
|
272
303
|
|
|
273
304
|
return isIOSSDKViewController(controller.parent)
|
|
274
305
|
}
|
|
306
|
+
|
|
307
|
+
private static func findRCTRootViewResult(_ viewController: UIViewController) -> RCTRootViewResult? {
|
|
308
|
+
if let rootView = viewController.view as? RCTRootView {
|
|
309
|
+
return RCTRootViewResult(viewController: viewController, view: rootView)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
for childVC in viewController.children {
|
|
313
|
+
if let result = findRCTRootViewResult(childVC) {
|
|
314
|
+
return result
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return nil
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
private static func findRCTRootViewPlaceholderResult(
|
|
322
|
+
_ viewController: UIViewController
|
|
323
|
+
) -> RCTRootViewPlaceholderResult? {
|
|
324
|
+
if let rootViewPlaceholder = viewController.view as? RCTRootViewPlaceholder {
|
|
325
|
+
return RCTRootViewPlaceholderResult(viewController: viewController, view: rootViewPlaceholder)
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
for childVC in viewController.children {
|
|
329
|
+
if let result = findRCTRootViewPlaceholderResult(childVC) {
|
|
330
|
+
return result
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return nil
|
|
335
|
+
}
|
|
275
336
|
}
|
|
276
337
|
|
|
277
338
|
extension FWNavigatorModule {
|
package/package.json
CHANGED