Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion native-modules/native-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-native-logger",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-native-logger",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-aes-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-aes-crypto",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-aes-crypto",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-app-update/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-app-update",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-app-update",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-async-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-async-storage",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-async-storage",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-background-thread/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-background-thread",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-background-thread",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-bundle-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-bundle-crypto",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-bundle-crypto",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-bundle-update/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-bundle-update",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-bundle-update",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-check-biometric-auth-changed",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-check-biometric-auth-changed",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-cloud-fs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-cloud-fs",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-cloud-fs TurboModule for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-cloud-kit-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-cloud-kit-module",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-cloud-kit-module",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,13 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
}
}

// iOS-only: cold-start LOCAL notification deep-link payload. Android delivers
// notification taps through the launching Intent's extras, a separate path,
// so there is nothing to hand back here.
override fun getAndClearColdStartLocalNotification(): Promise<String> {
return Promise.resolved("")
}

// MARK: - ExitModule

override fun exitApp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,26 @@ public class LaunchOptionsStore: NSObject {
public var deviceToken: Data?
public var startupTime: TimeInterval = 0

// Cold-start deep-link: the JSON `userInfo` of a LOCAL notification the user
// tapped to launch the (killed) app. The legacy `NotificationCenter` broadcast
// in AppDelegate is fire-and-forget and is lost on cold start because JS has
// not registered a listener yet; this slot is a pull buffer JS drains once it
// boots. In-memory ONLY (no NSUserDefaults): a new process = fresh `nil`, so
// it is naturally launch-scoped and cannot replay a stale tap on a later
// unrelated cold start. AppDelegate writes it via KVC
// (`setValue(_:forKey:"coldStartLocalNotification")`), same bridge as the
// properties above.
public var coldStartLocalNotification: String?

private static let deviceTokenKey = "1k_device_token"

// Read-once: hand the payload to JS exactly once per launch.
public func takeColdStartLocalNotification() -> String {
let value = coldStartLocalNotification ?? ""
coldStartLocalNotification = nil
return value
}

public func getDeviceTokenString() -> String {
// Prefer the JS-saved token (persisted across launches)
if let saved = UserDefaults.standard.string(forKey: LaunchOptionsStore.deviceTokenKey), !saved.isEmpty {
Expand Down Expand Up @@ -189,6 +207,12 @@ class ReactNativeDeviceUtils: HybridReactNativeDeviceUtilsSpec {
}
}

func getAndClearColdStartLocalNotification() throws -> Promise<String> {
return Promise.async {
return LaunchOptionsStore.shared.takeColdStartLocalNotification()
}
}

// MARK: - ExitModule

func exitApp() throws {
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-device-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-device-utils",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-device-utils",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export interface ReactNativeDeviceUtils
saveDeviceToken(token: string): Promise<void>;
registerDeviceToken(): Promise<boolean>;
getStartupTime(): Promise<number>;
// Returns the JSON userInfo of a LOCAL notification the user tapped to launch
// the (killed) app, then clears it so it is delivered exactly once. Empty
// string when there is none. iOS-only meaningful; Android returns "".
getAndClearColdStartLocalNotification(): Promise<string>;

// ExitModule
exitApp(): void;
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-dns-lookup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-dns-lookup",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-dns-lookup",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-get-random-values/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-get-random-values",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-get-random-values",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-keychain-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-keychain-module",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-keychain-module",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-lite-card/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-lite-card",
"version": "3.0.54",
"version": "3.0.56",
"description": "lite card",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-network-info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-network-info",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-network-info",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-pbkdf2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-pbkdf2",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-pbkdf2",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-perf-memory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-perf-memory",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-perf-memory",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-perf-stats/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-perf-stats",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-perf-stats",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-ping/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-ping",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-ping TurboModule for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-range-downloader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-range-downloader",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-range-downloader",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-splash-screen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-splash-screen",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-splash-screen",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-split-bundle-loader",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-split-bundle-loader",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-tcp-socket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-tcp-socket",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-tcp-socket",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-modules/react-native-zip-archive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-zip-archive",
"version": "3.0.54",
"version": "3.0.56",
"description": "react-native-zip-archive Nitro HybridObject for OneKey",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion native-views/react-native-auto-size-input/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-auto-size-input",
"version": "3.0.54",
"version": "3.0.56",
"description": "Auto-sizing text input with font scaling, prefix and suffix support",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions native-views/react-native-chart-webview/ChartWebview.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Pod::Spec.new do |s|

s.dependency 'React-jsi'
s.dependency 'React-callinvoker'
# DEBUG instrumentation: route native chart lifecycle logs into the shared
# OneKeyLog file (app-latest.log) via `import ReactNativeNativeLogger`.
s.dependency 'ReactNativeNativeLogger'

load 'nitrogen/generated/ios/ChartWebview+autolinking.rb'
add_nitrogen_files(s)
Expand Down
Loading