react-native-firework-sdk 2.4.3-beta.1 → 2.4.3-beta.2

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.
Files changed (13) hide show
  1. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  2. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
  3. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +3 -17
  4. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  5. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
  6. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +3 -17
  7. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +3 -17
  8. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +9 -9
  9. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +1 -18
  10. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIView+AppLanguage.swift +6 -6
  11. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/CALayer+LayoutFlip.swift +6 -24
  12. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/UIView+LayoutFlip.swift +3 -0
  13. package/package.json +1 -1
@@ -1015,13 +1015,6 @@
1015
1015
  "json_format_version": 8
1016
1016
  },
1017
1017
  "ConstValues": [
1018
- {
1019
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
1020
- "kind": "Array",
1021
- "offset": 141,
1022
- "length": 47,
1023
- "value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
1024
- },
1025
1018
  {
1026
1019
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
1027
1020
  "kind": "BooleanLiteral",
@@ -1036,31 +1029,24 @@
1036
1029
  "length": 5,
1037
1030
  "value": "false"
1038
1031
  },
1039
- {
1040
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1041
- "kind": "BooleanLiteral",
1042
- "offset": 133,
1043
- "length": 5,
1044
- "value": "false"
1045
- },
1046
1032
  {
1047
1033
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1048
1034
  "kind": "StringLiteral",
1049
- "offset": 232,
1035
+ "offset": 185,
1050
1036
  "length": 16,
1051
1037
  "value": "\"basicTransform\""
1052
1038
  },
1053
1039
  {
1054
1040
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1055
1041
  "kind": "StringLiteral",
1056
- "offset": 289,
1042
+ "offset": 242,
1057
1043
  "length": 20,
1058
1044
  "value": "\"isRenderStartLayer\""
1059
1045
  },
1060
1046
  {
1061
1047
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1062
1048
  "kind": "StringLiteral",
1063
- "offset": 347,
1049
+ "offset": 300,
1064
1050
  "length": 17,
1065
1051
  "value": "\"affineTransform\""
1066
1052
  },
@@ -1015,13 +1015,6 @@
1015
1015
  "json_format_version": 8
1016
1016
  },
1017
1017
  "ConstValues": [
1018
- {
1019
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
1020
- "kind": "Array",
1021
- "offset": 141,
1022
- "length": 47,
1023
- "value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
1024
- },
1025
1018
  {
1026
1019
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
1027
1020
  "kind": "BooleanLiteral",
@@ -1036,31 +1029,24 @@
1036
1029
  "length": 5,
1037
1030
  "value": "false"
1038
1031
  },
1039
- {
1040
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1041
- "kind": "BooleanLiteral",
1042
- "offset": 133,
1043
- "length": 5,
1044
- "value": "false"
1045
- },
1046
1032
  {
1047
1033
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1048
1034
  "kind": "StringLiteral",
1049
- "offset": 232,
1035
+ "offset": 185,
1050
1036
  "length": 16,
1051
1037
  "value": "\"basicTransform\""
1052
1038
  },
1053
1039
  {
1054
1040
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1055
1041
  "kind": "StringLiteral",
1056
- "offset": 289,
1042
+ "offset": 242,
1057
1043
  "length": 20,
1058
1044
  "value": "\"isRenderStartLayer\""
1059
1045
  },
1060
1046
  {
1061
1047
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1062
1048
  "kind": "StringLiteral",
1063
- "offset": 347,
1049
+ "offset": 300,
1064
1050
  "length": 17,
1065
1051
  "value": "\"affineTransform\""
1066
1052
  },
@@ -1015,13 +1015,6 @@
1015
1015
  "json_format_version": 8
1016
1016
  },
1017
1017
  "ConstValues": [
1018
- {
1019
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
1020
- "kind": "Array",
1021
- "offset": 141,
1022
- "length": 47,
1023
- "value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
1024
- },
1025
1018
  {
1026
1019
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
1027
1020
  "kind": "BooleanLiteral",
@@ -1036,31 +1029,24 @@
1036
1029
  "length": 5,
1037
1030
  "value": "false"
1038
1031
  },
1039
- {
1040
- "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1041
- "kind": "BooleanLiteral",
1042
- "offset": 133,
1043
- "length": 5,
1044
- "value": "false"
1045
- },
1046
1032
  {
1047
1033
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1048
1034
  "kind": "StringLiteral",
1049
- "offset": 232,
1035
+ "offset": 185,
1050
1036
  "length": 16,
1051
1037
  "value": "\"basicTransform\""
1052
1038
  },
1053
1039
  {
1054
1040
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1055
1041
  "kind": "StringLiteral",
1056
- "offset": 289,
1042
+ "offset": 242,
1057
1043
  "length": 20,
1058
1044
  "value": "\"isRenderStartLayer\""
1059
1045
  },
1060
1046
  {
1061
1047
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/Extensions\/UIKit\/CALayer+LayoutFlip.swift",
1062
1048
  "kind": "StringLiteral",
1063
- "offset": 347,
1049
+ "offset": 300,
1064
1050
  "length": 17,
1065
1051
  "value": "\"affineTransform\""
1066
1052
  },
@@ -14,11 +14,11 @@
14
14
  </data>
15
15
  <key>Info.plist</key>
16
16
  <data>
17
- XL07IR4hzHxfQiVKm9lt+b3F7WU=
17
+ AZtnotFFaHYw2Q1ZCxQLGxR/1m8=
18
18
  </data>
19
19
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
20
20
  <data>
21
- g9GVkuJdtLc2uItILFJeUxiTpMM=
21
+ roVrA+zBhViTn1+musiH9YtZN4g=
22
22
  </data>
23
23
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
24
24
  <data>
@@ -34,11 +34,11 @@
34
34
  </data>
35
35
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
36
36
  <data>
37
- lFqxS5KVCNWjc7ibAMM6aflcppE=
37
+ 8nUapBbTxrEctwHv8MiF5EjVMBM=
38
38
  </data>
39
39
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
40
40
  <data>
41
- g9GVkuJdtLc2uItILFJeUxiTpMM=
41
+ roVrA+zBhViTn1+musiH9YtZN4g=
42
42
  </data>
43
43
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
44
44
  <data>
@@ -54,7 +54,7 @@
54
54
  </data>
55
55
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
56
56
  <data>
57
- 1wEsVRlvcqB5U8S/z4Bff8/XMaI=
57
+ lAZN1MHaVzad24oIUuAL665Ve/c=
58
58
  </data>
59
59
  <key>Modules/module.modulemap</key>
60
60
  <data>
@@ -81,7 +81,7 @@
81
81
  <dict>
82
82
  <key>hash2</key>
83
83
  <data>
84
- 7krJHLhUsdInfDkiXFxAZErnl6O0eL31Y0NJL3BOCbo=
84
+ zLmAM9IPyMwInxOl0os0ke7UNYdLFUljxP3ZpE5nvv0=
85
85
  </data>
86
86
  </dict>
87
87
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
@@ -109,14 +109,14 @@
109
109
  <dict>
110
110
  <key>hash2</key>
111
111
  <data>
112
- rP/44xmO/e6Q4HtYnTz1O4jIk7I+V80zXAIY8w6eUyM=
112
+ HpN79cN877uO6s4DyXGEgNjLGLruwBVaXP2k3kk7b6E=
113
113
  </data>
114
114
  </dict>
115
115
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
116
116
  <dict>
117
117
  <key>hash2</key>
118
118
  <data>
119
- 7krJHLhUsdInfDkiXFxAZErnl6O0eL31Y0NJL3BOCbo=
119
+ zLmAM9IPyMwInxOl0os0ke7UNYdLFUljxP3ZpE5nvv0=
120
120
  </data>
121
121
  </dict>
122
122
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
@@ -144,7 +144,7 @@
144
144
  <dict>
145
145
  <key>hash2</key>
146
146
  <data>
147
- QyR25r6LDZww7PwN9eajGGEkFfIRPhItvxlhPEXYPjw=
147
+ mDMN+Ylv+JqpZt1BRxltE+4ueOU3vJBg+X3hZ3UxVFo=
148
148
  </data>
149
149
  </dict>
150
150
  <key>Modules/module.modulemap</key>
@@ -6,11 +6,6 @@
6
6
 
7
7
  import Foundation
8
8
 
9
- private var FWHostList: [String] = [
10
- "api.firework.tv",
11
- "p2.fwpixel.com"
12
- ]
13
-
14
9
  extension URLSession {
15
10
  static func swizzleURLSessionMethodsForAppLanguage() {
16
11
  // swiftlint:disable:next line_length
@@ -41,20 +36,8 @@ extension URLSession {
41
36
  }
42
37
 
43
38
  private func swizzleRequest(_ request: URLRequest) -> URLRequest {
44
- var host = ""
45
- #if compiler(>=5.7)
46
- if #available(iOS 16, *) {
47
- host = request.url?.host() ?? ""
48
- } else {
49
- host = request.url?.host ?? ""
50
- }
51
- #else
52
- host = request.url?.host ?? ""
53
- #endif
54
-
55
39
  if let language = AppLanguageManager.shared.appLanguage,
56
- let languageCode = AppLanguageManager.shared.appLanguageCode,
57
- FWHostList.contains(host) {
40
+ let languageCode = AppLanguageManager.shared.appLanguageCode {
58
41
  var mutableRequest = request
59
42
  if language != languageCode {
60
43
  mutableRequest.setValue("\(language),\(languageCode);q=0.9", forHTTPHeaderField: "Accept-Language")
@@ -30,7 +30,7 @@ extension UIView {
30
30
  @objc func fw_init(frame: CGRect) -> UIView {
31
31
  let view = self.fw_init(frame: frame)
32
32
  updateViewTypeIfNeeded(view)
33
-
33
+
34
34
  return view
35
35
  }
36
36
 
@@ -38,21 +38,21 @@ extension UIView {
38
38
  self.fw_viewAwakeFromNib()
39
39
  updateViewTypeIfNeeded(self)
40
40
  }
41
-
41
+
42
42
  @objc func fw_semanticContentAttribute() -> UISemanticContentAttribute {
43
43
  if self.isIOSSDKView, AppLanguageManager.shared.shouldHorizontalFlip {
44
44
  return .forceLeftToRight
45
45
  }
46
-
46
+
47
47
  return fw_semanticContentAttribute()
48
48
  }
49
-
49
+
50
50
  private func updateViewTypeIfNeeded(_ view: UIView) {
51
51
  if view is FireworkPlayerView, AppLanguageManager.shared.shouldHorizontalFlip {
52
52
  view.viewType = .normal
53
53
  }
54
-
55
- DispatchQueue.main.async {
54
+
55
+ DispatchQueue.main.async {
56
56
  if view.layer.sublayers?.first(where: { layer in
57
57
  layer is AVPlayerLayer
58
58
  }) != nil, AppLanguageManager.shared.shouldHorizontalFlip {
@@ -6,8 +6,6 @@
6
6
 
7
7
  import UIKit
8
8
 
9
- private var gHasEnabledHorizontalFlip = false
10
-
11
9
  extension CALayer {
12
10
  private struct AssociatedKeys {
13
11
  static var basicTransform = "basicTransform"
@@ -42,11 +40,6 @@ extension CALayer {
42
40
  }
43
41
 
44
42
  set {
45
- if objc_getAssociatedObject(self, &AssociatedKeys.basicTransform) == nil,
46
- CGAffineTransformIsIdentity(newValue) {
47
- return
48
- }
49
-
50
43
  objc_setAssociatedObject(
51
44
  self,
52
45
  &AssociatedKeys.basicTransform,
@@ -66,7 +59,7 @@ extension CALayer {
66
59
  set {
67
60
  objc_setAssociatedObject(
68
61
  self,
69
- &AssociatedKeys.basicTransform,
62
+ &AssociatedKeys.isRenderStartLayer,
70
63
  newValue,
71
64
  .OBJC_ASSOCIATION_RETAIN_NONATOMIC
72
65
  )
@@ -74,11 +67,7 @@ extension CALayer {
74
67
  }
75
68
 
76
69
  @objc func fw_setAffineTransform(_ affineTransform: CGAffineTransform) {
77
- if !gHasEnabledHorizontalFlip && LayoutFlipManager.shared.enableHorizontalFlip {
78
- gHasEnabledHorizontalFlip = true
79
- }
80
-
81
- if gHasEnabledHorizontalFlip {
70
+ if objc_getAssociatedObject(self, &AssociatedKeys.basicTransform) != nil {
82
71
  objc_setAssociatedObject(
83
72
  self,
84
73
  &AssociatedKeys.affineTransform,
@@ -92,11 +81,7 @@ extension CALayer {
92
81
  }
93
82
 
94
83
  @objc func fw_affineTransform() -> CGAffineTransform {
95
- if !gHasEnabledHorizontalFlip && LayoutFlipManager.shared.enableHorizontalFlip {
96
- gHasEnabledHorizontalFlip = true
97
- }
98
-
99
- if gHasEnabledHorizontalFlip {
84
+ if objc_getAssociatedObject(self, &AssociatedKeys.basicTransform) != nil {
100
85
  if let value = objc_getAssociatedObject(self, &AssociatedKeys.affineTransform) as? NSValue {
101
86
  return value.cgAffineTransformValue
102
87
  }
@@ -107,7 +92,8 @@ extension CALayer {
107
92
  }
108
93
 
109
94
  @objc func fw_add(_ anim: CAAnimation, forKey key: String?) {
110
- if let basicAnim = anim as? CABasicAnimation,
95
+ if objc_getAssociatedObject(self, &AssociatedKeys.basicTransform) != nil,
96
+ let basicAnim = anim as? CABasicAnimation,
111
97
  let keyPath = basicAnim.keyPath,
112
98
  keyPath.starts(with: "transform.scale"),
113
99
  self.basicTransform.a == -1,
@@ -121,11 +107,7 @@ extension CALayer {
121
107
  }
122
108
 
123
109
  @objc func fw_render(in ctx: CGContext) {
124
- if !gHasEnabledHorizontalFlip && LayoutFlipManager.shared.enableHorizontalFlip {
125
- gHasEnabledHorizontalFlip = true
126
- }
127
-
128
- if gHasEnabledHorizontalFlip {
110
+ if objc_getAssociatedObject(self, &AssociatedKeys.basicTransform) != nil {
129
111
  var isRenderStartLayer = true
130
112
  var allSuperLayerTransform = basicTransform
131
113
  var layer = self
@@ -138,6 +138,9 @@ extension UIView {
138
138
  }
139
139
 
140
140
  func renewLayerTransformForceRecursively(_ forceRecursively: Bool) {
141
+ if !isIOSSDKView {
142
+ return
143
+ }
141
144
  updateCalculatedViewType()
142
145
  let updatedViewType = calculatedViewType
143
146
  let superViewCalculatedViewType = superview?.calculatedViewType ?? .auto
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.4.3-beta.1",
3
+ "version": "2.4.3-beta.2",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",