@onekeyfe/react-native-bundle-update 1.1.22 → 1.1.24
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.
package/android/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt
CHANGED
|
@@ -575,12 +575,12 @@ object BundleUpdateStoreAndroid {
|
|
|
575
575
|
/**
|
|
576
576
|
* Returns true if the OneKey developer mode (DevSettings) is enabled.
|
|
577
577
|
* Reads the persisted value from MMKV storage (key: onekey_developer_mode_enabled,
|
|
578
|
-
* instance: onekey-app-setting) written by the JS ServiceDevSetting layer.
|
|
578
|
+
* instance: onekey-app-dev-setting) written by the JS ServiceDevSetting layer.
|
|
579
579
|
*/
|
|
580
580
|
fun isDevSettingsEnabled(context: Context): Boolean {
|
|
581
581
|
return try {
|
|
582
582
|
MMKV.initialize(context)
|
|
583
|
-
val mmkv = MMKV.mmkvWithID("onekey-app-setting") ?: return false
|
|
583
|
+
val mmkv = MMKV.mmkvWithID("onekey-app-dev-setting") ?: return false
|
|
584
584
|
mmkv.decodeBool("onekey_developer_mode_enabled", false)
|
|
585
585
|
} catch (e: Exception) {
|
|
586
586
|
false
|
|
@@ -590,12 +590,12 @@ object BundleUpdateStoreAndroid {
|
|
|
590
590
|
/**
|
|
591
591
|
* Returns true if the skip-GPG-verification toggle is enabled in developer settings.
|
|
592
592
|
* Reads the persisted value from MMKV storage (key: onekey_bundle_skip_gpg_verification,
|
|
593
|
-
* instance: onekey-app-setting).
|
|
593
|
+
* instance: onekey-app-dev-setting).
|
|
594
594
|
*/
|
|
595
595
|
fun isSkipGPGEnabled(context: Context): Boolean {
|
|
596
596
|
return try {
|
|
597
597
|
MMKV.initialize(context)
|
|
598
|
-
val mmkv = MMKV.mmkvWithID("onekey-app-setting") ?: return false
|
|
598
|
+
val mmkv = MMKV.mmkvWithID("onekey-app-dev-setting") ?: return false
|
|
599
599
|
mmkv.decodeBool("onekey_bundle_skip_gpg_verification", false)
|
|
600
600
|
} catch (e: Exception) {
|
|
601
601
|
false
|
|
@@ -198,16 +198,16 @@ public class BundleUpdateStore: NSObject {
|
|
|
198
198
|
public static func isDevSettingsEnabled() -> Bool {
|
|
199
199
|
// Ensure MMKV is initialized (safe to call multiple times)
|
|
200
200
|
MMKV.initialize(rootDir: nil)
|
|
201
|
-
guard let mmkv = MMKV(mmapID: "onekey-app-setting") else { return false }
|
|
201
|
+
guard let mmkv = MMKV(mmapID: "onekey-app-dev-setting") else { return false }
|
|
202
202
|
return mmkv.bool(forKey: "onekey_developer_mode_enabled", defaultValue: false)
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/// Returns true if the skip-GPG-verification toggle is enabled in developer settings.
|
|
206
206
|
/// Reads the persisted value from MMKV storage (key: onekey_bundle_skip_gpg_verification,
|
|
207
|
-
/// instance: onekey-app-setting).
|
|
207
|
+
/// instance: onekey-app-dev-setting).
|
|
208
208
|
public static func isSkipGPGEnabled() -> Bool {
|
|
209
209
|
MMKV.initialize(rootDir: nil)
|
|
210
|
-
guard let mmkv = MMKV(mmapID: "onekey-app-setting") else { return false }
|
|
210
|
+
guard let mmkv = MMKV(mmapID: "onekey-app-dev-setting") else { return false }
|
|
211
211
|
return mmkv.bool(forKey: "onekey_bundle_skip_gpg_verification", defaultValue: false)
|
|
212
212
|
}
|
|
213
213
|
|
package/package.json
CHANGED
package/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# react-native-bundle-update
|
|
2
|
-
|
|
3
|
-
react-native-bundle-update
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
npm install react-native-bundle-update react-native-nitro-modules
|
|
9
|
-
|
|
10
|
-
> `react-native-nitro-modules` is required as this library relies on [Nitro Modules](https://nitro.margelo.com/).
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
import { ReactNativeBundleUpdate } from 'react-native-bundle-update';
|
|
17
|
-
|
|
18
|
-
// ...
|
|
19
|
-
|
|
20
|
-
const result = await ReactNativeBundleUpdate.hello({ message: 'World' });
|
|
21
|
-
console.log(result); // { success: true, data: 'Hello, World!' }
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Contributing
|
|
25
|
-
|
|
26
|
-
- [Development workflow](CONTRIBUTING.md#development-workflow)
|
|
27
|
-
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
|
|
28
|
-
- [Code of conduct](CODE_OF_CONDUCT.md)
|
|
29
|
-
|
|
30
|
-
## License
|
|
31
|
-
|
|
32
|
-
MIT
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|