expo-dev-launcher 58.0.6 → 58.0.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.
- package/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/DevLauncherController.kt +24 -5
- package/android/src/debug/java/expo/modules/devlauncher/helpers/DevLauncherURLHelper.kt +8 -21
- package/expo-dev-launcher-gradle-plugin/.gradle/9.3.1/executionHistory/executionHistory.bin +0 -0
- package/expo-dev-launcher-gradle-plugin/.gradle/9.3.1/executionHistory/executionHistory.lock +0 -0
- package/expo-dev-launcher-gradle-plugin/.gradle/9.4.1/executionHistory/executionHistory.bin +0 -0
- package/expo-dev-launcher-gradle-plugin/.gradle/9.4.1/executionHistory/executionHistory.lock +0 -0
- package/expo-dev-launcher-gradle-plugin/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/expo-dev-launcher-gradle-plugin/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/expo-dev-launcher-gradle-plugin/.gradle/file-system.probe +0 -0
- package/expo-dev-launcher-gradle-plugin/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
- package/ios/EXDevLauncherController.m +18 -1
- package/ios/EXDevLauncherURLHelper.swift +27 -30
- package/ios/Tests/EXDevLauncherURLHelperTests.swift +28 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 58.0.7 — 2026-09-25
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Add __expo_* reserved namespace for deep linking URLs. ([#50287](https://github.com/expo/expo/pull/50287) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
|
|
13
19
|
## 58.0.6 — 2026-09-23
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -24,13 +24,13 @@ expoModule {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
group = "host.exp.exponent"
|
|
27
|
-
version = "58.0.
|
|
27
|
+
version = "58.0.7"
|
|
28
28
|
|
|
29
29
|
android {
|
|
30
30
|
namespace "expo.modules.devlauncher"
|
|
31
31
|
defaultConfig {
|
|
32
32
|
versionCode 9
|
|
33
|
-
versionName "58.0.
|
|
33
|
+
versionName "58.0.7"
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
buildTypes {
|
|
@@ -21,8 +21,6 @@ import expo.modules.devlauncher.helpers.DevLauncherInstallationIDHelper
|
|
|
21
21
|
import expo.modules.devlauncher.helpers.DevLauncherMetadataHelper
|
|
22
22
|
import expo.modules.devlauncher.helpers.getFieldInClassHierarchy
|
|
23
23
|
import expo.modules.devlauncher.helpers.hasEnabledFlag
|
|
24
|
-
import expo.modules.devlauncher.helpers.hasUrlQueryParam
|
|
25
|
-
import expo.modules.devlauncher.helpers.isDevLauncherUrl
|
|
26
24
|
import expo.modules.devlauncher.helpers.runBlockingOnMainThread
|
|
27
25
|
import expo.modules.devlauncher.launcher.DevLauncherActivity
|
|
28
26
|
import expo.modules.devlauncher.launcher.DevLauncherAppEntry
|
|
@@ -41,6 +39,8 @@ import expo.modules.devlauncher.launcher.loaders.createAppLoader
|
|
|
41
39
|
import expo.modules.devlauncher.react.activitydelegates.DevLauncherReactActivityNOPDelegate
|
|
42
40
|
import expo.modules.devlauncher.react.activitydelegates.DevLauncherReactActivityRedirectDelegate
|
|
43
41
|
import expo.modules.devlauncher.services.DependencyInjection
|
|
42
|
+
import expo.modules.devmenu.launch.ExpoLauncherUrl
|
|
43
|
+
import expo.modules.devmenu.launch.applyDevMenuLaunchParams
|
|
44
44
|
import expo.modules.kotlin.weak
|
|
45
45
|
import expo.modules.manifests.core.Manifest
|
|
46
46
|
import expo.modules.updatesinterface.UpdatesDevLauncherInterface
|
|
@@ -137,6 +137,8 @@ class DevLauncherController private constructor(
|
|
|
137
137
|
manifest = result.manifest
|
|
138
138
|
manifestURL = result.manifestURL
|
|
139
139
|
|
|
140
|
+
// Dev menu params on URLs that did not come through `handleIntent`, e.g. typed into the launcher.
|
|
141
|
+
DependencyInjection.devMenuPreferences?.let { result.devLauncherUrl?.launch?.applyDevMenuLaunchParams(it) }
|
|
140
142
|
if (url.toString().contains("disableOnboarding=1") || manifestURL?.toString()?.contains("disableOnboarding=1") == true) {
|
|
141
143
|
DependencyInjection.devMenuPreferences?.isOnboardingFinished = true
|
|
142
144
|
}
|
|
@@ -289,17 +291,33 @@ class DevLauncherController private constructor(
|
|
|
289
291
|
intent
|
|
290
292
|
?.data
|
|
291
293
|
?.let { uri ->
|
|
294
|
+
val launch = ExpoLauncherUrl(uri)
|
|
295
|
+
|
|
292
296
|
// used by appetize for snack
|
|
293
297
|
if (intent.getBooleanExtra("EXDevMenuDisableAutoLaunch", false)) {
|
|
294
298
|
DependencyInjection.devMenuPreferences?.showsAtLaunch = false
|
|
295
299
|
DependencyInjection.devMenuPreferences?.isOnboardingFinished = true
|
|
296
300
|
}
|
|
297
301
|
|
|
298
|
-
if (!
|
|
302
|
+
if (!launch.isLauncherCommand) {
|
|
299
303
|
return handleExternalIntent(intent)
|
|
300
304
|
}
|
|
301
305
|
|
|
302
|
-
|
|
306
|
+
// The dev menu params apply to every launcher command, with or without a `__expo_url`.
|
|
307
|
+
DependencyInjection.devMenuPreferences?.let { launch.applyDevMenuLaunchParams(it) }
|
|
308
|
+
|
|
309
|
+
if (launch.targetUrl == null) {
|
|
310
|
+
if (!launch.isLegacyHost && launch.remainderHasDestination) {
|
|
311
|
+
// e.g. `myapp://login?__expo_disable_fab=1`: the reserved params are applied above,
|
|
312
|
+
// the app receives the rest as a regular deep link.
|
|
313
|
+
intent.data = launch.strippedUrl
|
|
314
|
+
return handleExternalIntent(intent)
|
|
315
|
+
}
|
|
316
|
+
if (!launch.isLegacyHost && mode == Mode.APP) {
|
|
317
|
+
// e.g. `exp+slug://?__expo_disable_fab=1` while a project is open: the params are applied
|
|
318
|
+
// above and there is nothing to open, so keep the project running.
|
|
319
|
+
return true
|
|
320
|
+
}
|
|
303
321
|
// edge case: this is a dev launcher url, but it does not specify what url to open
|
|
304
322
|
// fallback to navigating to the launcher home screen
|
|
305
323
|
if (useDefaultLaunchUrlFallback) {
|
|
@@ -312,7 +330,8 @@ class DevLauncherController private constructor(
|
|
|
312
330
|
|
|
313
331
|
coroutineScope.launch {
|
|
314
332
|
try {
|
|
315
|
-
|
|
333
|
+
// The app must not see the reserved params.
|
|
334
|
+
pendingIntentRegistry.intent = Intent(intent).setData(launch.strippedUrl)
|
|
316
335
|
loadApp(uri, activityToBeInvalidated)
|
|
317
336
|
} catch (e: Throwable) {
|
|
318
337
|
DevLauncherErrorActivity.showFatalError(context, DevLauncherAppError(e.message, e))
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
package expo.modules.devlauncher.helpers
|
|
2
2
|
|
|
3
3
|
import android.net.Uri
|
|
4
|
+
import expo.modules.devmenu.launch.ExpoLauncherUrl
|
|
4
5
|
|
|
5
6
|
fun replaceEXPScheme(uri: Uri, scheme: String): Uri = if (uri.scheme == "exp") uri.buildUpon().scheme(scheme).build() else uri
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fun hasUrlQueryParam(uri: Uri): Boolean {
|
|
10
|
-
return uri.getQueryParameter("url") != null
|
|
11
|
-
}
|
|
12
|
-
|
|
8
|
+
/** Strict `name=1` flag on this URL. Used for the `disableFab` and `disableAutoLaunch` params, which update the saved preferences. */
|
|
13
9
|
fun hasEnabledFlag(uri: Uri, name: String): Boolean {
|
|
14
10
|
return uri.isHierarchical && uri.getQueryParameter(name) == "1"
|
|
15
11
|
}
|
|
16
12
|
|
|
17
|
-
class DevLauncherUrl(
|
|
18
|
-
val
|
|
13
|
+
class DevLauncherUrl(url: Uri) {
|
|
14
|
+
val launch = ExpoLauncherUrl(url)
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
queryParams[name] = url.getQueryParameter(name) ?: ""
|
|
23
|
-
}
|
|
16
|
+
/** The project URL to load, with `exp` rewritten to `http`. */
|
|
17
|
+
val url: Uri = replaceEXPScheme(launch.targetUrl ?: launch.strippedUrl, "http")
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
val queryUrl = Uri.parse(queryParams["url"])
|
|
28
|
-
url = replaceEXPScheme(queryUrl, "http")
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
url = replaceEXPScheme(url, "http")
|
|
32
|
-
}
|
|
33
|
-
}
|
|
19
|
+
/** Query params the launcher passes on, for example `updateMessage`. Never contains reserved params. */
|
|
20
|
+
val queryParams: Map<String, String> = launch.passthroughParams
|
|
34
21
|
}
|
|
Binary file
|
package/expo-dev-launcher-gradle-plugin/.gradle/9.3.1/executionHistory/executionHistory.lock
CHANGED
|
Binary file
|
|
Binary file
|
package/expo-dev-launcher-gradle-plugin/.gradle/9.4.1/executionHistory/executionHistory.lock
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Fri Sep 25 09:12:16 IST 2026
|
|
2
2
|
gradle.version=9.4.1
|
|
Binary file
|
|
Binary file
|
|
@@ -322,7 +322,24 @@ static const NSTimeInterval EXDevLauncherDefaultRequestTimeout = 10.0;
|
|
|
322
322
|
return [self _handleExternalDeepLink:url options:options];
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
+
// The dev menu params apply to every launcher command, with or without a `__expo_url`.
|
|
326
|
+
[[DevMenuManager shared] applyLaunchParamsFromURL:url];
|
|
327
|
+
[EXDevLauncherURLHelper applyDevMenuPreferencesIfNeeded:url];
|
|
328
|
+
|
|
325
329
|
if (![EXDevLauncherURLHelper hasUrlQueryParam:url]) {
|
|
330
|
+
NSURL *externalDeepLink = [EXDevLauncherURLHelper externalDeepLinkFromLauncherURL:url];
|
|
331
|
+
if (externalDeepLink) {
|
|
332
|
+
// e.g. `myapp://login?__expo_disable_fab=1`: the reserved params are applied above, the app
|
|
333
|
+
// receives the rest as its initial URL. While the app is already running, the linking
|
|
334
|
+
// subscribers still deliver the original URL; `unwrapDevLaunchURL` in expo-linking drops
|
|
335
|
+
// the reserved params on the JS side.
|
|
336
|
+
return [self _handleExternalDeepLink:externalDeepLink options:options];
|
|
337
|
+
}
|
|
338
|
+
if ([self isAppRunning] && ![EXDevLauncherURLHelper isLegacyLauncherURL:url]) {
|
|
339
|
+
// e.g. `exp+slug://?__expo_disable_fab=1` while a project is open: the params are applied
|
|
340
|
+
// above and there is nothing to open, so keep the project running.
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
326
343
|
// edgecase: this is a dev launcher url but it doesn't specify what url to open
|
|
327
344
|
// fallback to navigating to the launcher home screen
|
|
328
345
|
[self launchDefaultUrlFallbackOrNavigateToLauncher];
|
|
@@ -427,7 +444,7 @@ static const NSTimeInterval EXDevLauncherDefaultRequestTimeout = 10.0;
|
|
|
427
444
|
[EXDevLauncherURLHelper disableOnboardingPopupIfNeeded:url];
|
|
428
445
|
[EXDevLauncherURLHelper disableOnboardingPopupIfNeeded:expoUrl];
|
|
429
446
|
|
|
430
|
-
[
|
|
447
|
+
[[DevMenuManager shared] applyLaunchParamsFromURL:url];
|
|
431
448
|
|
|
432
449
|
NSString *runtimeVersion = @"";
|
|
433
450
|
if (_updatesInterface) {
|
|
@@ -13,15 +13,9 @@ public class EXDevLauncherUrl: NSObject {
|
|
|
13
13
|
|
|
14
14
|
@objc
|
|
15
15
|
public init(_ url: URL) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let urlParam = queryParams["url"],
|
|
20
|
-
let urlFromParam = URL(string: urlParam) {
|
|
21
|
-
self.url = EXDevLauncherURLHelper.replaceEXPScheme(urlFromParam, to: "http")
|
|
22
|
-
} else {
|
|
23
|
-
self.url = EXDevLauncherURLHelper.replaceEXPScheme(url, to: "http")
|
|
24
|
-
}
|
|
16
|
+
let launch = ExpoLauncherURL(url)
|
|
17
|
+
self.queryParams = launch.passthroughParams
|
|
18
|
+
self.url = EXDevLauncherURLHelper.replaceEXPScheme(launch.targetURL ?? launch.strippedURL, to: "http")
|
|
25
19
|
|
|
26
20
|
super.init()
|
|
27
21
|
}
|
|
@@ -31,17 +25,34 @@ public class EXDevLauncherUrl: NSObject {
|
|
|
31
25
|
public class EXDevLauncherURLHelper: NSObject {
|
|
32
26
|
@objc
|
|
33
27
|
public static func isDevLauncherURL(_ url: URL?) -> Bool {
|
|
34
|
-
|
|
28
|
+
guard let url else {
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
return ExpoLauncherURL(url).isLauncherCommand
|
|
35
32
|
}
|
|
36
33
|
|
|
34
|
+
/// Whether the launcher URL names a project to load, through `__expo_url` or the legacy `url`.
|
|
37
35
|
@objc
|
|
38
36
|
public static func hasUrlQueryParam(_ url: URL) -> Bool {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
return ExpoLauncherURL(url).targetURL != nil
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/// Whether the URL uses the legacy `expo-development-client` host.
|
|
41
|
+
@objc
|
|
42
|
+
public static func isLegacyLauncherURL(_ url: URL) -> Bool {
|
|
43
|
+
return ExpoLauncherURL(url).isLegacyHost
|
|
44
|
+
}
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
/// For a launcher command without a target, e.g. `myapp://login?__expo_disable_fab=1`, the deep
|
|
47
|
+
/// link the app receives once the launcher consumed the reserved params. `nil` when the remainder
|
|
48
|
+
/// has no destination of its own.
|
|
49
|
+
@objc
|
|
50
|
+
public static func externalDeepLink(fromLauncherURL url: URL) -> URL? {
|
|
51
|
+
let launch = ExpoLauncherURL(url)
|
|
52
|
+
guard launch.isLauncherCommand, !launch.isLegacyHost, launch.targetURL == nil, launch.remainderHasDestination else {
|
|
53
|
+
return nil
|
|
54
|
+
}
|
|
55
|
+
return launch.strippedURL
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
static func hasEnabledFlag(_ name: String, in url: URL) -> Bool {
|
|
@@ -60,6 +71,7 @@ public class EXDevLauncherURLHelper: NSObject {
|
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
73
|
|
|
74
|
+
/// The `disableFab=1` and `disableAutoLaunch=1` params update the saved dev menu preferences.
|
|
63
75
|
@objc
|
|
64
76
|
public static func applyDevMenuPreferencesIfNeeded(_ url: URL) {
|
|
65
77
|
if hasEnabledFlag("disableFab", in: url) {
|
|
@@ -104,19 +116,4 @@ public class EXDevLauncherURLHelper: NSObject {
|
|
|
104
116
|
components.queryItems = queryItems
|
|
105
117
|
return components.url ?? bundleURL
|
|
106
118
|
}
|
|
107
|
-
|
|
108
|
-
@objc
|
|
109
|
-
public static func getQueryParamsForUrl(_ url: URL) -> [String: String] {
|
|
110
|
-
guard let components = URLComponents(url: url, resolvingAgainstBaseURL: false),
|
|
111
|
-
let queryItems = components.queryItems else {
|
|
112
|
-
return [:]
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
var params: [String: String] = [:]
|
|
116
|
-
for item in queryItems {
|
|
117
|
-
params[item.name] = item.value?.removingPercentEncoding ?? ""
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return params
|
|
121
|
-
}
|
|
122
119
|
}
|
|
@@ -58,6 +58,34 @@ class EXDevLauncherURLHelperTests: XCTestCase {
|
|
|
58
58
|
XCTAssertFalse(EXDevLauncherURLHelper.hasEnabledFlag("disableFab", in: urlWithFlagInAppUrl))
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
func testIsDevLauncherURLAcceptsReservedParamsOnAnyHost() {
|
|
62
|
+
XCTAssertTrue(EXDevLauncherURLHelper.isDevLauncherURL(URL(string: "myapp://login?__expo_disable_fab=1")))
|
|
63
|
+
XCTAssertTrue(EXDevLauncherURLHelper.isDevLauncherURL(URL(string: "myapp://?__expo_url=\(encodedUrlString)")))
|
|
64
|
+
XCTAssertFalse(EXDevLauncherURLHelper.isDevLauncherURL(URL(string: "myapp://login")))
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
func testHasUrlQueryParam() {
|
|
68
|
+
XCTAssertTrue(EXDevLauncherURLHelper.hasUrlQueryParam(URL(string: "scheme://expo-development-client/?url=\(encodedUrlString)")!))
|
|
69
|
+
XCTAssertTrue(EXDevLauncherURLHelper.hasUrlQueryParam(URL(string: "myapp://?__expo_url=\(encodedUrlString)")!))
|
|
70
|
+
XCTAssertFalse(EXDevLauncherURLHelper.hasUrlQueryParam(URL(string: "scheme://expo-development-client")!))
|
|
71
|
+
XCTAssertFalse(EXDevLauncherURLHelper.hasUrlQueryParam(URL(string: "myapp://login?__expo_disable_fab=1")!))
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
func testDevLauncherUrlResolvesTargetAndDropsReservedParams() {
|
|
75
|
+
let legacy = EXDevLauncherUrl(URL(string: "scheme://expo-development-client/?url=exp%3A%2F%2Flocalhost%3A8081&updateMessage=hi&__expo_disable_fab=1")!)
|
|
76
|
+
XCTAssertEqual(legacy.url.absoluteString, "http://localhost:8081")
|
|
77
|
+
XCTAssertEqual(legacy.queryParams["updateMessage"], "hi")
|
|
78
|
+
XCTAssertNil(legacy.queryParams["__expo_disable_fab"])
|
|
79
|
+
|
|
80
|
+
let reserved = EXDevLauncherUrl(URL(string: "scheme://?__expo_url=exp%3A%2F%2Flocalhost%3A8081&__expo_disable_fab=1")!)
|
|
81
|
+
XCTAssertEqual(reserved.url.absoluteString, "http://localhost:8081")
|
|
82
|
+
XCTAssertTrue(reserved.queryParams.isEmpty)
|
|
83
|
+
|
|
84
|
+
let plain = EXDevLauncherUrl(URL(string: "exp://localhost:8081?x=1")!)
|
|
85
|
+
XCTAssertEqual(plain.url.absoluteString, "http://localhost:8081?x=1")
|
|
86
|
+
XCTAssertEqual(plain.queryParams["x"], "1")
|
|
87
|
+
}
|
|
88
|
+
|
|
61
89
|
// HELPER
|
|
62
90
|
func expectDevLauncherUrlToEqual(input: String, expected: String) {
|
|
63
91
|
let devLauncherUrl = EXDevLauncherUrl(URL(string: input)!)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-launcher",
|
|
3
3
|
"title": "Expo Development Launcher",
|
|
4
|
-
"version": "58.0.
|
|
4
|
+
"version": "58.0.7",
|
|
5
5
|
"description": "Pre-release version of the Expo development launcher package for testing.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"homepage": "https://docs.expo.dev",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@expo/schema-utils": "^58.0.0",
|
|
19
|
-
"expo-dev-menu": "~58.0.
|
|
19
|
+
"expo-dev-menu": "~58.0.7",
|
|
20
20
|
"expo-manifests": "~58.0.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/jest": "^29.2.1",
|
|
28
28
|
"@types/node": "^22.14.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "ad41d067bd3df6dd12f1788acc6b54a68e7a650d",
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "pnpm build:plugin",
|
|
33
33
|
"build:plugin": "expo-build --base plugin cjs:src",
|