@hot-updater/react-native 0.25.3 → 0.25.5
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.
|
@@ -154,7 +154,12 @@ class HotUpdaterImpl {
|
|
|
154
154
|
* Get minimum bundle ID string
|
|
155
155
|
* @return The minimum bundle ID string
|
|
156
156
|
*/
|
|
157
|
-
fun getMinBundleId(): String
|
|
157
|
+
fun getMinBundleId(): String {
|
|
158
|
+
if (BuildConfig.DEBUG) {
|
|
159
|
+
return "00000000-0000-0000-0000-000000000000"
|
|
160
|
+
}
|
|
161
|
+
return BuildConfig.MIN_BUNDLE_ID.takeIf { it != "null" } ?: generateMinBundleIdFromBuildTimestamp()
|
|
162
|
+
}
|
|
158
163
|
|
|
159
164
|
/**
|
|
160
165
|
* Generates a bundle ID based on build timestamp
|
|
@@ -220,6 +225,19 @@ class HotUpdaterImpl {
|
|
|
220
225
|
}
|
|
221
226
|
}
|
|
222
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Gets the current fingerprint hash
|
|
230
|
+
* @return The fingerprint hash or null if not set
|
|
231
|
+
*/
|
|
232
|
+
fun getFingerprintHash(): String? {
|
|
233
|
+
val id = context.resources.getIdentifier("hot_updater_fingerprint_hash", "string", context.packageName)
|
|
234
|
+
return if (id != 0) {
|
|
235
|
+
context.getString(id).takeIf { it.isNotEmpty() }
|
|
236
|
+
} else {
|
|
237
|
+
null
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
223
241
|
/**
|
|
224
242
|
* Gets the current update channel
|
|
225
243
|
* @return The channel name or null if not set
|
|
@@ -74,7 +74,7 @@ RCT_EXPORT_MODULE();
|
|
|
74
74
|
|
|
75
75
|
#pragma mark - React Native Constants (Keep getMinBundleId, delegate others)
|
|
76
76
|
|
|
77
|
-
//
|
|
77
|
+
// Returns the minimum bundle ID string, either from Info.plist or generated from build timestamp
|
|
78
78
|
- (NSString *)getMinBundleId {
|
|
79
79
|
static NSString *uuid = nil;
|
|
80
80
|
static dispatch_once_t onceToken;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/react-native",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.5",
|
|
4
4
|
"description": "React Native OTA solution for self-hosted",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
"react-native": "0.79.1",
|
|
121
121
|
"react-native-builder-bob": "^0.40.10",
|
|
122
122
|
"typescript": "^5.8.3",
|
|
123
|
-
"hot-updater": "0.25.
|
|
123
|
+
"hot-updater": "0.25.5"
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
126
|
"use-sync-external-store": "1.5.0",
|
|
127
|
-
"@hot-updater/cli-tools": "0.25.
|
|
128
|
-
"@hot-updater/core": "0.25.
|
|
129
|
-
"@hot-updater/js": "0.25.
|
|
130
|
-
"@hot-updater/plugin-core": "0.25.
|
|
127
|
+
"@hot-updater/cli-tools": "0.25.5",
|
|
128
|
+
"@hot-updater/core": "0.25.5",
|
|
129
|
+
"@hot-updater/js": "0.25.5",
|
|
130
|
+
"@hot-updater/plugin-core": "0.25.5"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {
|
|
133
133
|
"build": "bob build && tsc -p plugin/tsconfig.build.json",
|