expo-dev-launcher 6.0.19 → 6.0.20
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
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 6.0.20 — 2025-12-05
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Fix port scanning on pysical devices. ([#40824](https://github.com/expo/expo/pull/40824) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
13
19
|
## 6.0.19 — 2025-12-04
|
|
14
20
|
|
|
15
21
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -20,13 +20,13 @@ expoModule {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
group = "host.exp.exponent"
|
|
23
|
-
version = "6.0.
|
|
23
|
+
version = "6.0.20"
|
|
24
24
|
|
|
25
25
|
android {
|
|
26
26
|
namespace "expo.modules.devlauncher"
|
|
27
27
|
defaultConfig {
|
|
28
28
|
versionCode 9
|
|
29
|
-
versionName "6.0.
|
|
29
|
+
versionName "6.0.20"
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
buildTypes {
|
|
@@ -125,12 +125,15 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
125
125
|
// swiftlint:disable number_separator
|
|
126
126
|
let portsToCheck = [8081, 8082, 8_083, 8084, 8085, 19000, 19001, 19002]
|
|
127
127
|
// swiftlint:enable number_separator
|
|
128
|
-
let baseAddress = "http://localhost"
|
|
129
128
|
|
|
129
|
+
let ipsToScan = NetworkUtilities.getIPAddressesToScan()
|
|
130
130
|
await withTaskGroup(of: DevServer?.self) { group in
|
|
131
|
-
for
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
for ip in ipsToScan {
|
|
132
|
+
for port in portsToCheck {
|
|
133
|
+
group.addTask {
|
|
134
|
+
let baseAddress = ip == "localhost" ? "http://localhost" : "http://\(ip)"
|
|
135
|
+
return await self.checkDevServer(url: "\(baseAddress):\(port)")
|
|
136
|
+
}
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
139
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import Foundation
|
|
4
|
+
import Network
|
|
5
|
+
|
|
6
|
+
class NetworkUtilities {
|
|
7
|
+
// Same approach as expo-network just without throwing.
|
|
8
|
+
static func getLocalIPAddress() -> String? {
|
|
9
|
+
var address: String?
|
|
10
|
+
|
|
11
|
+
var ifaddr: UnsafeMutablePointer<ifaddrs>?
|
|
12
|
+
guard getifaddrs(&ifaddr) == 0 else { return nil }
|
|
13
|
+
guard let firstAddr = ifaddr else { return nil }
|
|
14
|
+
|
|
15
|
+
defer { freeifaddrs(ifaddr) }
|
|
16
|
+
|
|
17
|
+
for ifptr in sequence(first: firstAddr, next: { $0.pointee.ifa_next }) {
|
|
18
|
+
let interface = ifptr.pointee
|
|
19
|
+
|
|
20
|
+
let addrFamily = interface.ifa_addr.pointee.sa_family
|
|
21
|
+
if addrFamily == UInt8(AF_INET) {
|
|
22
|
+
let name = String(cString: interface.ifa_name)
|
|
23
|
+
|
|
24
|
+
if name == "en0" || name == "en1" {
|
|
25
|
+
var hostname = [CChar](repeating: 0, count: Int(NI_MAXHOST))
|
|
26
|
+
getnameinfo(
|
|
27
|
+
interface.ifa_addr,
|
|
28
|
+
socklen_t(interface.ifa_addr.pointee.sa_len),
|
|
29
|
+
&hostname,
|
|
30
|
+
socklen_t(hostname.count),
|
|
31
|
+
nil,
|
|
32
|
+
socklen_t(0),
|
|
33
|
+
NI_NUMERICHOST
|
|
34
|
+
)
|
|
35
|
+
address = String(cString: hostname)
|
|
36
|
+
break
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return address
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static func isSimulator() -> Bool {
|
|
45
|
+
#if targetEnvironment(simulator)
|
|
46
|
+
return true
|
|
47
|
+
#else
|
|
48
|
+
return false
|
|
49
|
+
#endif
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static func getIPAddressesToScan() -> [String] {
|
|
53
|
+
if isSimulator() {
|
|
54
|
+
return ["localhost"]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
guard let localIP = getLocalIPAddress() else {
|
|
58
|
+
return ["localhost"]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let components = localIP.split(separator: ".")
|
|
62
|
+
guard components.count == 4 else {
|
|
63
|
+
return ["localhost"]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let subnet = components.prefix(3).joined(separator: ".")
|
|
67
|
+
|
|
68
|
+
return [
|
|
69
|
+
"localhost",
|
|
70
|
+
"\(subnet).1"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-launcher",
|
|
3
3
|
"title": "Expo Development Launcher",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.20",
|
|
5
5
|
"description": "Pre-release version of the Expo development launcher package for testing.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"ajv": "^8.11.0",
|
|
19
19
|
"expo-dev-menu": "7.0.18",
|
|
20
|
-
"expo-manifests": "~1.0.
|
|
20
|
+
"expo-manifests": "~1.0.10"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"expo": "*"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "172a69f5f70c1d0e043e1532f924de97210cabc3"
|
|
26
26
|
}
|