@onekeyfe/react-native-device-utils 3.0.37 → 3.0.39

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.
@@ -6,6 +6,17 @@ import ReactNativeNativeLogger
6
6
  public class LaunchOptionsStore: NSObject {
7
7
  public static let shared = LaunchOptionsStore()
8
8
 
9
+ // Exposed as an Objective-C class method so the app's
10
+ // NSClassFromString + perform() bridge can reach the singleton.
11
+ // A Swift `static let` stored type property is NOT visible to the
12
+ // Objective-C runtime (even under @objcMembers), so KVC
13
+ // `value(forKeyPath: "shared")` returns nil and silently drops every
14
+ // `setValue(_:forKey:)` write (e.g. startupTime), which is why iOS
15
+ // never reported launch timing while Android did.
16
+ public static func sharedInstance() -> LaunchOptionsStore {
17
+ return shared
18
+ }
19
+
9
20
  public var launchOptions: [AnyHashable: Any]?
10
21
  public var deviceToken: Data?
11
22
  public var startupTime: TimeInterval = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-device-utils",
3
- "version": "3.0.37",
3
+ "version": "3.0.39",
4
4
  "description": "react-native-device-utils",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",