react-native-firework-sdk 2.15.0 → 2.15.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.
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
890B6B402BF5F9B4007E5762 /* NumberFormatter+AppLanguage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 890B6B3F2BF5F9B4007E5762 /* NumberFormatter+AppLanguage.swift */; };
|
|
11
10
|
891F4AF62A67E12800A9E8DA /* FWRNContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 891F4AF52A67E12800A9E8DA /* FWRNContainerViewController.swift */; };
|
|
12
11
|
891F4AF82A68DEDF00A9E8DA /* PushRNContainerParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 891F4AF72A68DEDF00A9E8DA /* PushRNContainerParams.swift */; };
|
|
13
12
|
891F4AFA2A68DF2B00A9E8DA /* RCTConvert+FWNavigatorModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 891F4AF92A68DF2B00A9E8DA /* RCTConvert+FWNavigatorModule.swift */; };
|
|
@@ -99,7 +98,6 @@
|
|
|
99
98
|
|
|
100
99
|
/* Begin PBXFileReference section */
|
|
101
100
|
1F6F718A2771B48100224AF3 /* FireworkSdk-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FireworkSdk-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
102
|
-
890B6B3F2BF5F9B4007E5762 /* NumberFormatter+AppLanguage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NumberFormatter+AppLanguage.swift"; sourceTree = "<group>"; };
|
|
103
101
|
891F4AF52A67E12800A9E8DA /* FWRNContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FWRNContainerViewController.swift; sourceTree = "<group>"; };
|
|
104
102
|
891F4AF72A68DEDF00A9E8DA /* PushRNContainerParams.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushRNContainerParams.swift; sourceTree = "<group>"; };
|
|
105
103
|
891F4AF92A68DF2B00A9E8DA /* RCTConvert+FWNavigatorModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RCTConvert+FWNavigatorModule.swift"; sourceTree = "<group>"; };
|
|
@@ -185,7 +183,6 @@
|
|
|
185
183
|
898873122A0A8E7E0089CD1C /* Extensions */ = {
|
|
186
184
|
isa = PBXGroup;
|
|
187
185
|
children = (
|
|
188
|
-
890B6B3F2BF5F9B4007E5762 /* NumberFormatter+AppLanguage.swift */,
|
|
189
186
|
89C105642BAD2C1D00E47CDD /* UIWindowScene+Swizzle.swift */,
|
|
190
187
|
898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */,
|
|
191
188
|
898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */,
|
|
@@ -427,7 +424,6 @@
|
|
|
427
424
|
8988735B2A0A8E7E0089CD1C /* FireworkSDKModule.m in Sources */,
|
|
428
425
|
8988736A2A0A8E7E0089CD1C /* VideoFeedConfiguration.swift in Sources */,
|
|
429
426
|
8975238D2817DEF80070EBB6 /* (null) in Sources */,
|
|
430
|
-
890B6B402BF5F9B4007E5762 /* NumberFormatter+AppLanguage.swift in Sources */,
|
|
431
427
|
8975238C2817DEF80070EBB6 /* (null) in Sources */,
|
|
432
428
|
8988736B2A0A8E7E0089CD1C /* VideoFeed.swift in Sources */,
|
|
433
429
|
891F4AF62A67E12800A9E8DA /* FWRNContainerViewController.swift in Sources */,
|
|
@@ -49,7 +49,6 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
49
49
|
self, selector: #selector(Self.onAppLanguageChanged),
|
|
50
50
|
name: AppLanguageManager.NotificationName.AppLanguageChanged, object: nil)
|
|
51
51
|
startMonitoringNetworkStatus()
|
|
52
|
-
swizzleMethodsForAppLanguage()
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
override func supportedEvents() -> [String]! {
|
|
@@ -229,7 +228,6 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
229
228
|
rejecter: @escaping RCTPromiseRejectBlock
|
|
230
229
|
) {
|
|
231
230
|
let result = AppLanguageManager.shared.changeAppLanguage(language)
|
|
232
|
-
swizzleMethodsForAppLanguage()
|
|
233
231
|
resolver(result)
|
|
234
232
|
}
|
|
235
233
|
|
|
@@ -327,16 +325,6 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
327
325
|
monitor.pathUpdateHandler = nil
|
|
328
326
|
monitor.cancel()
|
|
329
327
|
}
|
|
330
|
-
|
|
331
|
-
func swizzleMethodsForAppLanguage() {
|
|
332
|
-
if AppLanguageManager.shared.appLanguage == nil {
|
|
333
|
-
return
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
DispatchQueue.once {
|
|
337
|
-
NumberFormatter.swizzleNumberFormatterMethodsForAppLanguage()
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
328
|
}
|
|
341
329
|
|
|
342
330
|
extension FireworkSDKModule {
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// NumberFormatter+FWAppLanguage.swift
|
|
3
|
-
//
|
|
4
|
-
// Created by linjie jiang on 2023/2/20.
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
import Foundation
|
|
8
|
-
import FireworkVideoUI
|
|
9
|
-
|
|
10
|
-
extension NumberFormatter {
|
|
11
|
-
static func swizzleNumberFormatterMethodsForAppLanguage() {
|
|
12
|
-
Swizzle.swizzleSelector(
|
|
13
|
-
cls: self,
|
|
14
|
-
originalSelector: #selector(NumberFormatter.string(from:)),
|
|
15
|
-
customSelector: #selector(NumberFormatter.fw_string(from:)))
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@objc func fw_string(from number: NSNumber) -> String? {
|
|
19
|
-
if let language = AppLanguageManager.shared.appLanguage,
|
|
20
|
-
self.locale == Locale.current ||
|
|
21
|
-
self.locale == Locale.autoupdatingCurrent {
|
|
22
|
-
self.locale = Locale(identifier: language)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return fw_string(from: number)
|
|
26
|
-
}
|
|
27
|
-
}
|