react-native-firework-sdk 2.12.0 → 2.12.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.
@@ -74,6 +74,7 @@
74
74
  8988736B2A0A8E7E0089CD1C /* VideoFeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873432A0A8E7E0089CD1C /* VideoFeed.swift */; };
75
75
  8988736C2A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */; };
76
76
  8988736D2A0A8E7E0089CD1C /* VideoFeedManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873452A0A8E7E0089CD1C /* VideoFeedManager.m */; };
77
+ 89C105652BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C105642BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift */; };
77
78
  89C4D6A62A494EB800EFB74A /* StoryBlockConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */; };
78
79
  89C6791A2A736C80000C1A71 /* ButtonInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C679192A736C80000C1A71 /* ButtonInfo.swift */; };
79
80
  89D6BBF929ACE2DC00C8AA2A /* (null) in Sources */ = {isa = PBXBuildFile; };
@@ -141,6 +142,7 @@
141
142
  898873432A0A8E7E0089CD1C /* VideoFeed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoFeed.swift; sourceTree = "<group>"; };
142
143
  898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerConfiguration.swift; sourceTree = "<group>"; };
143
144
  898873452A0A8E7E0089CD1C /* VideoFeedManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoFeedManager.m; sourceTree = "<group>"; };
145
+ 89C105642BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIWindowScene+Swizzle.swift"; sourceTree = "<group>"; };
144
146
  89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryBlockConfiguration.swift; sourceTree = "<group>"; };
145
147
  89C679192A736C80000C1A71 /* ButtonInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonInfo.swift; sourceTree = "<group>"; };
146
148
  /* End PBXFileReference section */
@@ -181,6 +183,7 @@
181
183
  898873122A0A8E7E0089CD1C /* Extensions */ = {
182
184
  isa = PBXGroup;
183
185
  children = (
186
+ 89C105642BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift */,
184
187
  898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */,
185
188
  898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */,
186
189
  898873172A0A8E7E0089CD1C /* String+Color.swift */,
@@ -425,6 +428,7 @@
425
428
  8988736B2A0A8E7E0089CD1C /* VideoFeed.swift in Sources */,
426
429
  891F4AF62A67E12800A9E8DA /* FWRNContainerViewController.swift in Sources */,
427
430
  898873522A0A8E7E0089CD1C /* ShoppingCTAResult.swift in Sources */,
431
+ 89C105652BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift in Sources */,
428
432
  89C6791A2A736C80000C1A71 /* ButtonInfo.swift in Sources */,
429
433
  8975239D2817DEF80070EBB6 /* (null) in Sources */,
430
434
  898873562A0A8E7E0089CD1C /* SDKInitOptions.swift in Sources */,
@@ -39,6 +39,8 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
39
39
  self.initializeSDK(Self.cachedSDKInitOptions, true)
40
40
  }
41
41
 
42
+ UIWindowScene.swizzleMethods()
43
+
42
44
  _ = AppLanguageManager.shared
43
45
  NotificationCenter.default.addObserver(
44
46
  self, selector: #selector(Self.onAppLanguageChanged),
@@ -0,0 +1,33 @@
1
+ //
2
+ // UIWindowScene+Swizzle.swift
3
+ // react-native-firework-sdk
4
+ //
5
+ // Created by linjie jiang on 3/22/24.
6
+ //
7
+
8
+ import UIKit
9
+ import FireworkVideoUI
10
+
11
+ extension UIWindowScene {
12
+ static func swizzleMethods() {
13
+ #if DEBUG
14
+ Swizzle.swizzleSelector(
15
+ cls: self,
16
+ originalSelector: #selector(getter: UIWindowScene.windows),
17
+ customSelector: #selector(UIWindowScene.fw_windows)
18
+ )
19
+ #endif
20
+ }
21
+
22
+ @objc func fw_windows() -> [UIWindow] {
23
+ let windowList = self.fw_windows().filter { window in
24
+ let typeName = String(describing: type(of: window))
25
+ if typeName == "SKHiddenWindow" {
26
+ return false
27
+ }
28
+ return true
29
+ }
30
+
31
+ return windowList
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",