The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Mobile: record TestFlight 1.0.12 (80); iOS joins the Intern 3 setup hotspot itself (#2910)
tony496s5a5a7fd478fb
diff --git a/mobile/RELEASE.md b/mobile/RELEASE.mdindex e2a2301bd..6c0a11944 100644--- a/mobile/RELEASE.md+++ b/mobile/RELEASE.md@@ -148,9 +148,10 @@ may lack symbolicated stacks until the matching symbols are supplied.| `1.0.12 (77)` | 2026-11-02 | TestFlight. Start opens the new computer's harness, with a keep-on warning while updating and a bar while an agent installs; in Swarm, the floating chat composer, invitations, task steps and chat files up to 256 MB. Built from `feat/mobile-ios-android` at `78c63a84` || `1.0.12 (78)` | 2026-11-02 | TestFlight. In Swarm only, nothing else in `mobile/lib` changed since 77: the Buddy tab opens your one Swarm Buddy chat, Home's Sort by and Filter menu and always-on While you were away, a long press on a machine opens its menu. Built from `feat/mobile-ios-android` at `2c6939e6` || `1.0.12 (79)` | 2026-11-03 | TestFlight. In Swarm only, nothing else in `mobile/lib` changed since 78: invitations on Home with Join and Not now, Older chats from Home, a project's number counts only its own chat, the Buddy picker says when a machine is paused. Built from `feat/mobile-ios-android` at `e8620dbe` |+| `1.0.12 (80)` | 2026-11-03 | TestFlight. The iPhone joins the Intern 3 setup hotspot itself, and Set up Intern 3 reads a computer whose key is not logged yet as connecting, with a bar, on a slow Wi-Fi; in Swarm, the Slack-style Home and chat, Markdown in messages, route rows, terminal notes and proposals drawn as on Desktop, drafts and Not sent kept per account, search, and writes sent with the phone's own sign-in. Built from `feat/mobile-ios-android` at `7814f059` |-`pubspec.yaml` is now at `1.0.12+80`, the next build number. Build 79 (1.0.12) is the last TestFlight build and-the last Play build (54 went up outside this record, 53 went to Play only); do not upload any of them again. 1.0.1 to 1.0.10 are approved and 1.0.11 is submitted or approved, so new builds go up as 1.0.12 until it is submitted or approved too. Check App Store Connect before uploading if another release has happened meanwhile.+`pubspec.yaml` is now at `1.0.12+81`, the next build number. Build 80 (1.0.12) is the last TestFlight build and+79 the last Play build (54 went up outside this record, 53 went to Play only); do not upload any of them again. 1.0.1 to 1.0.10 are approved and 1.0.11 is submitted or approved, so new builds go up as 1.0.12 until it is submitted or approved too. Check App Store Connect before uploading if another release has happened meanwhile.### Why the app is iPhone-onlydiff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxprojindex 80c77170f..21be488e2 100644--- a/mobile/ios/Runner.xcodeproj/project.pbxproj+++ b/mobile/ios/Runner.xcodeproj/project.pbxproj@@ -379,6 +379,7 @@CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";DEVELOPMENT_TEAM = 54DJVWMJCC;ENABLE_BITCODE = NO;+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;INFOPLIST_FILE = Runner/Info.plist;LD_RUNPATH_SEARCH_PATHS = ("$(inherited)",@@ -561,6 +562,7 @@CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";DEVELOPMENT_TEAM = 54DJVWMJCC;ENABLE_BITCODE = NO;+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;INFOPLIST_FILE = Runner/Info.plist;LD_RUNPATH_SEARCH_PATHS = ("$(inherited)",@@ -584,6 +586,7 @@CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";DEVELOPMENT_TEAM = 54DJVWMJCC;ENABLE_BITCODE = NO;+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;INFOPLIST_FILE = Runner/Info.plist;LD_RUNPATH_SEARCH_PATHS = ("$(inherited)",diff --git a/mobile/ios/Runner/AppDelegate.swift b/mobile/ios/Runner/AppDelegate.swiftindex 81938601e..41b23018b 100644--- a/mobile/ios/Runner/AppDelegate.swift+++ b/mobile/ios/Runner/AppDelegate.swift@@ -2,6 +2,7 @@ import AVFoundationimport AudioToolboximport AuthenticationServicesimport Flutter+import NetworkExtensionimport Speechimport UIKitimport UserNotifications@@ -29,6 +30,86 @@ import UserNotificationsAppBadgeChannel.register(with: engineBridge.pluginRegistry)DictationChannel.register(with: engineBridge.pluginRegistry)LinkChannel.register(with: engineBridge.pluginRegistry)+ SetupWifiChannel.register(with: engineBridge.pluginRegistry)+ }+}++/// `harness/setup_wifi` — joining a new device's setup hotspot (Dart: `lib/phone/add_device/setup_hotspot.dart`),+/// as Android does (MainActivity.kt). `join` asks iOS for the open Wi-Fi whose name starts with `prefix`+/// (`Harness-`, or one device's whole name): iOS finds it and asks "Join Wi-Fi network …?" — the person+/// no longer goes to Settings ▸ Wi-Fi. It answers `joined` with the address the hotspot gave this phone,+/// or `unavailable` (cancelled, not found, or iOS stayed on its own Wi-Fi). `leave` forgets the hotspot,+/// and iOS goes back to the phone's own Wi-Fi by itself.+enum SetupWifiChannel {+ /// The hotspot's network (os/setup.py ADDRESS 10.42.0.1): this phone's address there is 10.42.0.x.+ private static let subnet = "10.42.0."++ static func register(with registry: FlutterPluginRegistry) {+ guard let messenger = registry.registrar(forPlugin: "HarnessSetupWifi")?.messenger() else { return }+ let channel = FlutterMethodChannel(name: "harness/setup_wifi", binaryMessenger: messenger)+ channel.setMethodCallHandler { call, result in+ switch call.method {+ case "join":+ let prefix = (call.arguments as? [String: Any])?["prefix"] as? String ?? ""+ guard !prefix.isEmpty else { result(["state": "unavailable"]); return }+ join(prefix: prefix, result: result)+ case "leave":+ leave { result(true) }+ default:+ result(FlutterMethodNotImplemented)+ }+ }+ }++ private static func join(prefix: String, result: @escaping FlutterResult) {+ // Open: os/setup.py hosts the hotspot with no password. Once: iOS forgets it when the app leaves the+ // front, so a phone is never left on a network with no Internet.+ let configuration = NEHotspotConfiguration(ssidPrefix: prefix)+ configuration.joinOnce = true+ NEHotspotConfigurationManager.shared.apply(configuration) { error in+ if let error = error as NSError?, error.code != NEHotspotConfigurationError.alreadyAssociated.rawValue {+ NSLog("[setup_wifi] join \(prefix): \(error.domain) \(error.code) \(error.localizedDescription)")+ result(["state": "unavailable"])+ return+ }+ // A join iOS reports is not yet one the phone is on: it can stay on its own Wi-Fi, which has the+ // Internet the hotspot lacks, and DHCP takes a moment. Only an address on the hotspot's network counts.+ awaitAddress(deadline: Date().addingTimeInterval(10)) { address in+ result(address == nil ? ["state": "unavailable"] : ["state": "joined", "address": address!])+ }+ }+ }++ private static func awaitAddress(deadline: Date, done: @escaping (String?) -> Void) {+ if let address = hotspotAddress() { done(address); return }+ if Date() > deadline { done(nil); return }+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { awaitAddress(deadline: deadline, done: done) }+ }++ /// This phone's IPv4 address on the hotspot's network, if it has one.+ private static func hotspotAddress() -> String? {+ var addresses: UnsafeMutablePointer<ifaddrs>?+ guard getifaddrs(&addresses) == 0, let first = addresses else { return nil }+ defer { freeifaddrs(addresses) }+ for entry in sequence(first: first, next: { $0.pointee.ifa_next }) {+ guard let socket = entry.pointee.ifa_addr, socket.pointee.sa_family == UInt8(AF_INET) else { continue }+ var host = [CChar](repeating: 0, count: Int(NI_MAXHOST))+ if getnameinfo(socket, socklen_t(socket.pointee.sa_len), &host, socklen_t(host.count), nil, 0, NI_NUMERICHOST) == 0 {+ let address = String(cString: host)+ if address.hasPrefix(subnet) { return address }+ }+ }+ return nil+ }++ /// Forgets every setup hotspot this app joined; iOS then goes back to the phone's own Wi-Fi.+ private static func leave(done: @escaping () -> Void) {+ NEHotspotConfigurationManager.shared.getConfiguredSSIDs { names in+ for name in names where name.hasPrefix("Harness-") {+ NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: name)+ }+ done()+ }}}diff --git a/mobile/ios/Runner/Runner.entitlements b/mobile/ios/Runner/Runner.entitlementsnew file mode 100644index 000000000..a87a77e53--- /dev/null+++ b/mobile/ios/Runner/Runner.entitlements@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <!-- Joining a new device's open setup hotspot, Harness-XXXX (SetupWifiChannel in AppDelegate.swift). -->+ <key>com.apple.developer.networking.HotspotConfiguration</key>+ <true/>+</dict>+</plist>diff --git a/mobile/lib/phone/add_device/setup_hotspot.dart b/mobile/lib/phone/add_device/setup_hotspot.dartindex fdd335b0a..55849f856 100644--- a/mobile/lib/phone/add_device/setup_hotspot.dart+++ b/mobile/lib/phone/add_device/setup_hotspot.dart@@ -7,9 +7,10 @@ import 'package:flutter/services.dart';/// A new device's setup hotspot, `Harness-XXXX`, and the page it answers on (os/setup.py).///-/// It is open. On Android the app joins it itself (`harness/setup_wifi` in MainActivity): Android lists-/// the `Harness-…` Wi-Fi nearby for the person to pick. Elsewhere the person picks it in Settings ▸ Wi-Fi and-/// comes back; the app notices by reaching the page.+/// It is open. On Android and iOS the app joins it itself (`harness/setup_wifi`: MainActivity, and+/// `SetupWifiChannel` in AppDelegate.swift): Android lists the `Harness-…` Wi-Fi nearby for the person to+/// pick, iOS finds it and asks to join it. Elsewhere the person picks it in Settings ▸ Wi-Fi and comes+/// back; the app notices by reaching the page.class SetupHotspot {SetupHotspot({Dio? dio}): _dio =@@ -31,7 +32,7 @@ class SetupHotspot {final Dio _dio;/// Whether this phone joins the hotspot by itself, or the person does in Settings.- static bool get joinsByItself => Platform.isAndroid;+ static bool get joinsByItself => Platform.isAndroid || Platform.isIOS;/// `joined` (with the address the hotspot gave this phone), `unavailable` (the person cancelled,/// or no device was found), or `unsupported`. Android's list shows only the `Harness-…` Wi-Fi, ordiff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex 5dac5a7d4..4bb9e87d1 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -2,7 +2,7 @@ name: harness_mobiledescription: "Harness viewer for iOS and Android."publish_to: 'none'-version: 1.0.12+80+version: 1.0.12+81environment:sdk: ^3.13.0