expo-updates-interface 55.1.1 → 55.1.2
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/CHANGELOG.md +7 -3
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesControllerRegistry.kt +0 -1
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterface.kt +46 -2
- package/ios/EXUpdatesInterface/UpdatesControllerRegistry.swift +1 -4
- package/ios/EXUpdatesInterface/{UpdatesExternalInterface.swift → UpdatesInterface.swift} +43 -14
- package/package.json +2 -2
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterfaceCallbacks.kt +0 -5
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesMetricsInterface.kt +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -10,15 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 55.1.2 — 2026-02-16
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Full native interface for updates. ([#42981](https://github.com/expo/expo/pull/42981) by [@douglowder](https://github.com/douglowder))
|
|
18
|
+
|
|
13
19
|
## 55.1.1 — 2026-01-22
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
|
16
22
|
|
|
17
23
|
## 55.1.0 — 2026-01-22
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- Full native interface for updates. ([#41527](https://github.com/expo/expo/pull/41527) by [@douglowder](https://github.com/douglowder))
|
|
25
|
+
_This version does not introduce any user-facing changes._
|
|
22
26
|
|
|
23
27
|
## 55.0.0 — 2026-01-21
|
|
24
28
|
|
package/android/build.gradle
CHANGED
|
@@ -4,7 +4,7 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '55.1.
|
|
7
|
+
version = '55.1.2'
|
|
8
8
|
|
|
9
9
|
expoModule {
|
|
10
10
|
canBePublished false
|
|
@@ -14,6 +14,6 @@ android {
|
|
|
14
14
|
namespace "expo.modules.updatesinterface"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 1
|
|
17
|
-
versionName '55.1.
|
|
17
|
+
versionName '55.1.2'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -3,12 +3,44 @@ package expo.modules.updatesinterface
|
|
|
3
3
|
import android.net.Uri
|
|
4
4
|
import org.json.JSONObject
|
|
5
5
|
import java.lang.ref.WeakReference
|
|
6
|
+
import java.util.UUID
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Interface for modules that depend on expo-updates for loading production updates but do not want
|
|
9
10
|
* to depend on expo-updates or delegate control to the singleton UpdatesController.
|
|
11
|
+
*
|
|
12
|
+
* All updates controllers implement this protocol
|
|
10
13
|
*/
|
|
11
14
|
interface UpdatesInterface {
|
|
15
|
+
/**
|
|
16
|
+
* Whether updates is enabled
|
|
17
|
+
*/
|
|
18
|
+
val isEnabled: Boolean get() = false
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* These properties are set when updates is enabled, or the dev client is running
|
|
22
|
+
*/
|
|
23
|
+
val runtimeVersion: String?
|
|
24
|
+
val updateUrl: Uri?
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* These properties are only set when updates is enabled
|
|
28
|
+
*/
|
|
29
|
+
val launchedUpdateId: UUID? get() = null
|
|
30
|
+
val embeddedUpdateId: UUID? get() = null
|
|
31
|
+
val launchAssetPath: String? get() = null
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* User code or third party modules can add a listener that will be called
|
|
35
|
+
* on updates state machine transitions (only when updates is enabled)
|
|
36
|
+
*/
|
|
37
|
+
fun subscribeToUpdatesStateChanges(listener: UpdatesStateChangeListener): UpdatesStateChangeSubscription
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Implemented only by the dev client updates controller.
|
|
42
|
+
*/
|
|
43
|
+
interface UpdatesDevLauncherInterface : UpdatesInterface {
|
|
12
44
|
interface UpdateCallback {
|
|
13
45
|
fun onFailure(e: Exception?)
|
|
14
46
|
fun onSuccess(update: Update?)
|
|
@@ -32,7 +64,19 @@ interface UpdatesInterface {
|
|
|
32
64
|
fun reset()
|
|
33
65
|
fun fetchUpdateWithConfiguration(configuration: HashMap<String, Any>, callback: UpdateCallback)
|
|
34
66
|
fun isValidUpdatesConfiguration(configuration: HashMap<String, Any>): Boolean
|
|
67
|
+
}
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
|
|
69
|
+
interface UpdatesInterfaceCallbacks {
|
|
70
|
+
fun onRequestRelaunch()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface UpdatesStateChangeListener {
|
|
74
|
+
fun updatesStateDidChange(event: Map<String, Any>)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface UpdatesStateChangeSubscription {
|
|
78
|
+
/*
|
|
79
|
+
* Call this to remove the subscription and stop receiving state change events
|
|
80
|
+
*/
|
|
81
|
+
fun remove()
|
|
38
82
|
}
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import Foundation
|
|
4
4
|
|
|
5
|
-
@objc(EXUpdatesControllerRegistry)
|
|
6
|
-
@objcMembers
|
|
7
5
|
public final class UpdatesControllerRegistry: NSObject {
|
|
8
|
-
public weak var controller:
|
|
9
|
-
public weak var metricsController: UpdatesExternalMetricsInterface?
|
|
6
|
+
public weak var controller: UpdatesInterface?
|
|
10
7
|
|
|
11
8
|
public static let sharedInstance = UpdatesControllerRegistry()
|
|
12
9
|
}
|
|
@@ -15,11 +15,38 @@ public typealias UpdatesProgressBlock = (_ successfulAssetCount: UInt, _ failedA
|
|
|
15
15
|
public typealias UpdatesManifestBlock = (_ manifest: [String: Any]) -> Bool
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* All updates controllers implement this protocol, which provides information on the running
|
|
19
|
+
* updates system.
|
|
20
20
|
*/
|
|
21
|
-
@objc(
|
|
22
|
-
public protocol
|
|
21
|
+
@objc(EXUpdatesInterface)
|
|
22
|
+
public protocol UpdatesInterface {
|
|
23
|
+
/*
|
|
24
|
+
* Whether updates is enabled
|
|
25
|
+
*/
|
|
26
|
+
@objc var isEnabled: Bool { get }
|
|
27
|
+
/*
|
|
28
|
+
* These properties are set when updates is enabled, or the dev client is running
|
|
29
|
+
*/
|
|
30
|
+
@objc var runtimeVersion: String? { get }
|
|
31
|
+
@objc var updateURL: URL? { get }
|
|
32
|
+
/*
|
|
33
|
+
* These properties are only set when updates is enabled
|
|
34
|
+
*/
|
|
35
|
+
@objc var launchedUpdateId: UUID? { get }
|
|
36
|
+
@objc var embeddedUpdateId: UUID? { get }
|
|
37
|
+
@objc var launchAssetPath: String? { get }
|
|
38
|
+
/*
|
|
39
|
+
* User code or third party modules can add a listener that will be called
|
|
40
|
+
* on updates state machine transitions (only when updates is enabled)
|
|
41
|
+
*/
|
|
42
|
+
@objc func subscribeToUpdatesStateChanges(_ listener: any UpdatesStateChangeListener) -> UpdatesStateChangeSubscription
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Implemented only by the dev client updates controller.
|
|
47
|
+
*/
|
|
48
|
+
@objc(EXUpdatesDevLauncherInterface)
|
|
49
|
+
public protocol UpdatesDevLauncherInterface: UpdatesInterface {
|
|
23
50
|
@objc weak var updatesExternalInterfaceDelegate: (any UpdatesExternalInterfaceDelegate)? { get set }
|
|
24
51
|
@objc var launchAssetURL: URL? { get }
|
|
25
52
|
|
|
@@ -44,16 +71,18 @@ public protocol UpdatesExternalInterface {
|
|
|
44
71
|
*/
|
|
45
72
|
@objc(EXUpdatesExternalInterfaceDelegate)
|
|
46
73
|
public protocol UpdatesExternalInterfaceDelegate {
|
|
47
|
-
@objc func updatesExternalInterfaceDidRequestRelaunch(_ updatesExternalInterface:
|
|
74
|
+
@objc func updatesExternalInterfaceDidRequestRelaunch(_ updatesExternalInterface: UpdatesDevLauncherInterface)
|
|
48
75
|
}
|
|
49
76
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
@objc(EXUpdatesStateChangeListener)
|
|
78
|
+
public protocol UpdatesStateChangeListener {
|
|
79
|
+
func updatesStateDidChange(_ event: [String: Any])
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@objc(EXUpdatesStateChangeSubscription)
|
|
83
|
+
public protocol UpdatesStateChangeSubscription {
|
|
84
|
+
/*
|
|
85
|
+
* Call this to remove the subscription and stop receiving state change events
|
|
86
|
+
*/
|
|
87
|
+
func remove()
|
|
59
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates-interface",
|
|
3
|
-
"version": "55.1.
|
|
3
|
+
"version": "55.1.2",
|
|
4
4
|
"description": "Native interface for modules that optionally depend on expo-updates, e.g. expo-dev-launcher.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"expo": "*"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "928cc951854450f3c72e00e8e420e567fabd1f8c"
|
|
27
27
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
package expo.modules.updatesinterface
|
|
2
|
-
|
|
3
|
-
import android.net.Uri
|
|
4
|
-
import java.util.UUID
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Interface for modules that depend on expo-updates for reading metrics information
|
|
8
|
-
* about the currently running update, but do not want
|
|
9
|
-
* to depend on expo-updates or delegate control to the singleton UpdatesController.
|
|
10
|
-
*/
|
|
11
|
-
interface UpdatesMetricsInterface {
|
|
12
|
-
val runtimeVersion: String?
|
|
13
|
-
val updateUrl: Uri?
|
|
14
|
-
val launchedUpdateId: UUID?
|
|
15
|
-
val embeddedUpdateId: UUID?
|
|
16
|
-
}
|