@vanikya/ota-react-native 0.2.6 → 0.2.7
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.
|
@@ -314,13 +314,8 @@ class OTAUpdateModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
|
314
314
|
try {
|
|
315
315
|
// Use ProcessPhoenix for graceful app restart
|
|
316
316
|
// This properly kills the current process and starts a new one
|
|
317
|
-
val
|
|
318
|
-
|
|
319
|
-
ProcessPhoenix.triggerRebirth(activity)
|
|
320
|
-
} else {
|
|
321
|
-
// Fallback to context-based restart
|
|
322
|
-
ProcessPhoenix.triggerRebirth(reactApplicationContext)
|
|
323
|
-
}
|
|
317
|
+
val context: android.content.Context = reactApplicationContext.applicationContext
|
|
318
|
+
ProcessPhoenix.triggerRebirth(context)
|
|
324
319
|
} catch (e: Exception) {
|
|
325
320
|
android.util.Log.e("OTAUpdate", "ProcessPhoenix restart failed: ${e.message}, using fallback")
|
|
326
321
|
// Fallback to manual restart
|
|
@@ -361,12 +356,8 @@ class OTAUpdateModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
|
361
356
|
android.util.Log.d("OTAUpdate", "Reload requested...")
|
|
362
357
|
mainHandler.postDelayed({
|
|
363
358
|
try {
|
|
364
|
-
val
|
|
365
|
-
|
|
366
|
-
ProcessPhoenix.triggerRebirth(activity)
|
|
367
|
-
} else {
|
|
368
|
-
ProcessPhoenix.triggerRebirth(reactApplicationContext)
|
|
369
|
-
}
|
|
359
|
+
val context: android.content.Context = reactApplicationContext.applicationContext
|
|
360
|
+
ProcessPhoenix.triggerRebirth(context)
|
|
370
361
|
} catch (e: Exception) {
|
|
371
362
|
android.util.Log.e("OTAUpdate", "Reload failed: ${e.message}")
|
|
372
363
|
}
|
package/lib/commonjs/index.js
CHANGED
package/lib/module/index.js
CHANGED
|
@@ -10,5 +10,5 @@ export { OTAApiClient, getDeviceInfo } from './utils/api';
|
|
|
10
10
|
export { UpdateStorage, getStorageAdapter } from './utils/storage';
|
|
11
11
|
export { calculateHash, verifyBundleHash, verifySignature, verifyBundle } from './utils/verification';
|
|
12
12
|
// Version info
|
|
13
|
-
export const VERSION = '0.2.
|
|
13
|
+
export const VERSION = '0.2.7';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,5 +9,5 @@ export { UpdateStorage, getStorageAdapter } from './utils/storage';
|
|
|
9
9
|
export type { StoredUpdate, StorageAdapter } from './utils/storage';
|
|
10
10
|
export { calculateHash, verifyBundleHash, verifySignature, verifyBundle, } from './utils/verification';
|
|
11
11
|
export type { VerificationResult } from './utils/verification';
|
|
12
|
-
export declare const VERSION = "0.2.
|
|
12
|
+
export declare const VERSION = "0.2.7";
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
package/src/index.ts
CHANGED