react-native-firework-sdk 1.8.0 → 1.9.0-beta.3

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 (97) hide show
  1. package/ios/Components/StoryBlock.swift +5 -1
  2. package/ios/Components/VideoFeed.swift +9 -5
  3. package/ios/FireworkSdk-Bridging-Header.h +6 -0
  4. package/ios/FireworkSdk.xcodeproj/project.pbxproj +374 -204
  5. package/ios/Models/NativeToRN/FireworkEventName.swift +1 -0
  6. package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +24 -6
  7. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -0
  8. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +31 -0
  9. package/ios/Utils/AppLanguage/Bundle+FWSwizzle.swift +58 -0
  10. package/ios/Utils/AppLanguage/FWAppLanguageManager.swift +118 -0
  11. package/ios/Utils/AppLanguage/FWLanguageUtil.swift +39 -0
  12. package/ios/Utils/AppLanguage/NumberFormatter+FWSwizzle.swift +25 -0
  13. package/ios/Utils/AppLanguage/UIImageView+FWSwizzle.swift +91 -0
  14. package/ios/Utils/AppLanguage/UILabel+FWSwizzle.swift +98 -0
  15. package/ios/Utils/AppLanguage/UITextField+FWSwizzle.swift +97 -0
  16. package/ios/Utils/AppLanguage/UITextView+FWSwizzle.swift +97 -0
  17. package/ios/Utils/AppLanguage/UIView+FWSwizzle.swift +38 -0
  18. package/ios/Utils/AppLanguage/UIViewController+FWSwizzle.swift +32 -0
  19. package/ios/Utils/AppLanguage/UIWindow+FWSwizzle.swift +26 -0
  20. package/ios/Utils/AppLanguage/URLSession+FWSwizzle.swift +69 -0
  21. package/ios/Utils/{DispatchQueue+FWOnce.swift → Extensions/DispatchQueue+FWOnce.swift} +3 -3
  22. package/ios/Utils/{UINavigationController+FWSwizzle.swift → Extensions/Swizzle/UINavigationController+FWSwizzle.swift} +6 -8
  23. package/ios/Utils/Extensions/UIView+FWUIHierarchy.swift +47 -0
  24. package/ios/Utils/FWRTL/Classes/Manager/FWRTLManager.h +25 -0
  25. package/ios/Utils/FWRTL/Classes/Manager/FWRTLManager.m +75 -0
  26. package/ios/Utils/FWRTL/Classes/UICategories/CALayer+FWRTL.h +21 -0
  27. package/ios/Utils/FWRTL/Classes/UICategories/CALayer+FWRTL.m +124 -0
  28. package/ios/Utils/FWRTL/Classes/UICategories/FWRTLRemoteViewControllerAdaptor.h +11 -0
  29. package/ios/Utils/FWRTL/Classes/UICategories/FWRTLRemoteViewControllerAdaptor.m +86 -0
  30. package/ios/Utils/FWRTL/Classes/UICategories/FWRTLWhiteListManager.h +16 -0
  31. package/ios/Utils/FWRTL/Classes/UICategories/FWRTLWhiteListManager.m +55 -0
  32. package/ios/Utils/FWRTL/Classes/UICategories/UILabel+FWRTL.h +18 -0
  33. package/ios/Utils/FWRTL/Classes/UICategories/UILabel+FWRTL.m +39 -0
  34. package/ios/Utils/FWRTL/Classes/UICategories/UIView+FWRTL.h +54 -0
  35. package/ios/Utils/FWRTL/Classes/UICategories/UIView+FWRTL.m +141 -0
  36. package/ios/Utils/FWRTL/Classes/UICategories/UIWindow+FWRTL.h +16 -0
  37. package/ios/Utils/FWRTL/Classes/UICategories/UIWindow+FWRTL.m +20 -0
  38. package/ios/Utils/FWRTL/Classes/Utils/FWRTLDefinitions.h +52 -0
  39. package/ios/Utils/FWRTL/Classes/Utils/NSObject+FWRTLReloadBlock.h +19 -0
  40. package/ios/Utils/FWRTL/Classes/Utils/NSObject+FWRTLReloadBlock.m +49 -0
  41. package/ios/Utils/FWRTL/Classes/Utils/NSString+FWRTL.h +21 -0
  42. package/ios/Utils/FWRTL/Classes/Utils/NSString+FWRTL.m +38 -0
  43. package/ios/Utils/FWRTL/Classes/Utils/UIImage+FWRTL.h +18 -0
  44. package/ios/Utils/FWRTL/Classes/Utils/UIImage+FWRTL.m +43 -0
  45. package/ios/Utils/FWSwizzleLoader.m +1 -1
  46. package/ios/Utils/FWSwizzleLoader.swift +13 -0
  47. package/ios/Utils/FWSwizzleUtil.swift +17 -9
  48. package/ios/react_native_firework_sdk.h +1 -0
  49. package/ios/scripts/firework_sdk_pods.rb +3 -0
  50. package/lib/commonjs/FWNavigator.js.map +1 -1
  51. package/lib/commonjs/FireworkSDK.js +17 -5
  52. package/lib/commonjs/FireworkSDK.js.map +1 -1
  53. package/lib/commonjs/VideoShopping.js.map +1 -1
  54. package/lib/commonjs/components/VideoFeed.js +12 -0
  55. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  56. package/lib/commonjs/index.js +6 -0
  57. package/lib/commonjs/index.js.map +1 -1
  58. package/lib/commonjs/models/FWEventName.js +1 -0
  59. package/lib/commonjs/models/FWEventName.js.map +1 -1
  60. package/lib/module/FWNavigator.js.map +1 -1
  61. package/lib/module/FireworkSDK.js +17 -5
  62. package/lib/module/FireworkSDK.js.map +1 -1
  63. package/lib/module/VideoShopping.js.map +1 -1
  64. package/lib/module/components/VideoFeed.js +7 -0
  65. package/lib/module/components/VideoFeed.js.map +1 -1
  66. package/lib/module/index.js +1 -1
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/models/FWEventName.js +1 -0
  69. package/lib/module/models/FWEventName.js.map +1 -1
  70. package/lib/typescript/FWNavigator.d.ts +1 -1
  71. package/lib/typescript/FireworkSDK.d.ts +7 -5
  72. package/lib/typescript/LiveStream.d.ts +2 -2
  73. package/lib/typescript/VideoShopping.d.ts +6 -6
  74. package/lib/typescript/components/VideoFeed.d.ts +1 -1
  75. package/lib/typescript/index.d.ts +4 -2
  76. package/lib/typescript/models/AdBadgeConfiguration.d.ts +1 -1
  77. package/lib/typescript/models/FWEventName.d.ts +1 -0
  78. package/lib/typescript/models/IOSFontInfo.d.ts +2 -2
  79. package/lib/typescript/models/NewNativeContainerProps.d.ts +1 -1
  80. package/lib/typescript/models/StoryBlockSource.d.ts +1 -1
  81. package/lib/typescript/models/VideoFeedConfiguration.d.ts +2 -2
  82. package/lib/typescript/models/VideoFeedSource.d.ts +1 -1
  83. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +5 -5
  84. package/package.json +7 -4
  85. package/react-native-firework-sdk.podspec +15 -18
  86. package/src/FWNavigator.ts +1 -1
  87. package/src/FireworkSDK.ts +14 -6
  88. package/src/VideoShopping.ts +4 -10
  89. package/src/components/VideoFeed.tsx +12 -0
  90. package/src/index.ts +7 -0
  91. package/src/models/FWEventName.ts +1 -0
  92. package/src/models/VideoFeedConfiguration.ts +1 -1
  93. package/src/models/VideoPlayerConfiguration.ts +1 -1
  94. package/ios/Utils/UIView+ParentViewController.swift +0 -21
  95. /package/ios/Utils/{String+Color.swift → Extensions/String+Color.swift} +0 -0
  96. /package/ios/Utils/{UIView+Constraints.swift → Extensions/UIView+Constraints.swift} +0 -0
  97. /package/ios/Utils/{UIViewController+AttachChild.swift → Extensions/UIViewController+AttachChild.swift} +0 -0
@@ -61,7 +61,7 @@ public class StoryBlock: UIView, StoryBlockViewControllerDelegate {
61
61
  }
62
62
 
63
63
  private func embed() {
64
- guard let parentVC = parentViewController else {
64
+ guard let parentVC = fwParentViewController else {
65
65
  return
66
66
  }
67
67
  guard self.storyBlockVC == nil else {
@@ -73,6 +73,10 @@ public class StoryBlock: UIView, StoryBlockViewControllerDelegate {
73
73
  storyBlockVC.isPictureInPictureEnabled = true
74
74
  }
75
75
 
76
+ if FWAppLanguageManager.shared.shouldHorizontalFlip {
77
+ storyBlockVC.view.fwrtl_viewType = FWRTLViewTypeFlip
78
+ }
79
+
76
80
  storyBlockVC.delegate = self
77
81
  self.storyBlockVC = storyBlockVC
78
82
  parentVC.attachChild(storyBlockVC, to: self)
@@ -157,8 +157,12 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
157
157
  embed()
158
158
  }
159
159
 
160
+ // swiftlint:disable:next function_body_length
160
161
  private func embed() {
161
- guard let parentVC = parentViewController, self.feedVC == nil else {
162
+ guard let parentVC = fwParentViewController else {
163
+ return
164
+ }
165
+ guard self.feedVC == nil else {
162
166
  return
163
167
  }
164
168
 
@@ -202,12 +206,14 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
202
206
  feedVC.viewConfiguration = viewConfiguration
203
207
  }
204
208
 
205
- // swiftlint:disable:next notification_center_detachment
206
- NotificationCenter.default.removeObserver(self)
207
209
  if self.enablePictureInPicture || feedViewConfig?.enablePictureInPicture == true {
208
210
  feedVC.isPictureInPictureEnabled = true
209
211
  }
210
212
 
213
+ if FWAppLanguageManager.shared.shouldHorizontalFlip {
214
+ feedVC.view.fwrtl_viewType = FWRTLViewTypeFlip
215
+ }
216
+
211
217
  feedVC.delegate = self
212
218
  self.feedVC = feedVC
213
219
  parentVC.attachChild(feedVC, to: self)
@@ -215,8 +221,6 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
215
221
 
216
222
  public override func removeFromSuperview() {
217
223
  super.removeFromSuperview()
218
- // swiftlint:disable:next notification_center_detachment
219
- NotificationCenter.default.removeObserver(self)
220
224
 
221
225
  guard let feedVC = self.feedVC else {
222
226
  return
@@ -6,3 +6,9 @@
6
6
  #import <React/RCTLog.h>
7
7
  #import <React/RCTRootView.h>
8
8
  #import <React/RCTBridge+Private.h>
9
+ #import "FWSwizzleLoader.h"
10
+ #import "FWRTLManager.h"
11
+ #import "UIView+FWRTL.h"
12
+ #import "UIWindow+FWRTL.h"
13
+ #import "UIView+FWRTL.h"
14
+ #import "UIImage+FWRTL.h"