Eager to see the Wi-Fi Aware communication between iPhone (iOS 26) and an Android device, I tried iOS 26 beta on my iPhone16. and tried below code snippet from provided example at https://developer.apple.com/documentation/wifiaware/building-peer-to-peer-apps. Idea is to first verify discovery of Android WiFiAware service on iOS.
extension WAPublishableService {
public static var simulationService: WAPublishableService {
allServices[simulationServiceName]!
}
}
extension WASubscribableService {
public static var simulationService: WASubscribableService {
allServices[simulationServiceName]!
}
}
struct ContentView: View {
@State private var showingDevicePicker = false
@State private var pairedDevices: [WAPairedDevice] = [] // To hold discovered/paired devices
var body: some View {
VStack {
Button("Discover Devices") {
showingDevicePicker = true // Trigger the device picker presentation
}
.sheet(isPresented: $showingDevicePicker) {
DevicePicker(.wifiAware(.connecting(to: .selected([]), from: .simulationService))) { endpoint in
print("Paired Endpoint: \(endpoint)")
} label: {
Image(systemName: "plus")
Text("Add Device")
} fallback: {
Image(systemName: "xmark.circle")
Text("Unavailable")
}
}
List(pairedDevices) { device in
Text(device.name ?? "Unknown Device")
}
}
}
}
With suggested entitlement of WiFiAware and info.plist of service info.
Then I had Android device with WIFiAware service publishing service (service name set '_sat-simulation._udp') from this app https://github.com/anagramrice/NAN.
But above iOS app is unable to find the service published from android device.
Am I missing something?
Note: the above Android-NAN app seems to be working fine between Android to Another Android.
Selecting any option will automatically load the page