New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flutter run should support wireless debugging of iOS devices #15072
Comments
|
cc @devoncarew IDE bug |
|
This issue was moved to flutter/flutter-intellij#2308 |
|
@phumberdroz, to re-phrase your report:
We then locate the device correctly, but when you try and run, |
|
100% correct |
|
I suspect we'll need to apply patches to our integration with the |
|
@cbracken Any update on this? |
|
We need this :( |
|
The thumbs-ups should be on the initial comment to raise priority. |
|
@anderscheow Can you talk more about why you need this? (It would help us with prioritization.) |
|
cc @cyanglaz |
|
@Hixie Using traditional way (wired connection) to do debugging is kinda troublesome. At some points, if cable is having issue, I need to get another cable in order to make debugging works. |
|
In my case, one of the test devices has a bad lightning port; the device is otherwise fully functional. This would allow me to use this device for debugging while avoiding the finicky cable. |
|
I think in general it is a convenience feature which I would expect from a
new platform like flutter.
Hot reload is also not necessary but moving forward developer will expect
it from platforms after flutter because it will become a standard like
wireless is already.
…On Wed, May 1, 2019 at 7:42 PM kunit1 ***@***.***> wrote:
In my case, one of the test devices has a bad lightning port; the device
is otherwise fully functional. This would allow me to use this device for
debugging while avoiding the finicky cable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15072 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3BZ2ZPVZEIE2WNMRL5YBDPTJIIJANCNFSM4ETI2JQQ>
.
|
|
Thanks for the clarifications! |
|
I suspect we'll need this sooner or later. Given the direction things are going (e.g. with headphones), one could also envision a day when Apple ships devices that charge wirelessly and don't include a lightning/USB-C port. FWIW I have no actual evidence for this; this is pure speculation on my part. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
I'll add that I've been testing extensively both with Android, over WiFi, and iOS, tethered with a Lightning cable, and it really does make a difference having wireless support. My iPhone is my daily driver so when I need to test with it, I first have to find it (did I leave it on the kitchen counter?), then find the cable (I unplugged it when I took my laptop to the park, but where is it?), plug it in, then pick up the phone with the cable attached getting in the way of my hand, making it clumsy to test; iTunes automatically opens and I have to close it, then when I'm done debugging, I have to unplug the cable again. It's maybe only a minute of hassle each time, but it adds up, and I find myself testing mostly using WiFi on Android because it's faster and more convenient. It's a bit like hot swap, not strictly necessary but really, really great. |
This comment has been minimized.
This comment has been minimized.
|
I have forked @jmagman PR here. It really doesn't work for me as commented here, however, there is no detail on what isn't working. I tried to dig into it and found out that this is due to the fact that However, you need to do this quite frequently, at least from my observation, when any of the devices iPhone or MacBook sleep/restart. I am quite busy recently so my exploration stops here. I guess there should be a way to fix this by looking into the reason why mac can't remember the device. |
Thanks for trying it. Flutter currently assumes the device is already paired in the normal tethered case. It doesn't try to pair if it's not. Once I had the device wirelessly set up in Xcode I didn't need to re-trust anything. It just constantly disconnected and forgot its network connected status, I kept having to re-tether and re-check that box (all in Xcode, this had nothing to do with Flutter). But I never needed to re-pair once it was paired. |
|
I am testing locally the "iproxy" program (which is at the heart of communication between computer and device).
I suspect then that is "iproxy" program that's having trouble forwarding ports over Wi-Fi? Let me know what you think guys, |
|
@epaterlini looking at the iproxy man page may help. I know nothing about it, but the Archlinux one is
So looks like the default is a USB connection with |
|
Hello @jpangburn, |
|
@epaterlini Sorry I misunderstood. I thought this line:
meant you were implicitly using |
@jmagman I have a suggestion for this. Since we have already added BonjourService in the Info.plist, i.e. I tried writing a simple Swift CLI app to interact with the Network framework and turns out being able to get the IP address. class BonjourService : NSObject, NetServiceDelegate {
private let domain = "local"
private let type = "_dartobservatory._tcp"
private var bonjourBrowser: NWBrowser?
private var netService: NetService?
init(name: String) {
super.init()
bonjourBrowser = NWBrowser(for: .bonjourWithTXTRecord(type: type, domain: domain), using: NWParameters())
let netService = NetService(domain: domain, type: type, name: name)
self.netService = netService
startDiscovering()
}
private func startDiscovering() {
bonjourBrowser!.browseResultsChangedHandler = {
(newResults: Set<NWBrowser.Result>, changes: Set<NWBrowser.Result.Change>) in
self.resolveNetworkInformation()
}
// bonjourBrowser.start(queue: DispatchQueue.global())
bonjourBrowser!.start(queue: DispatchQueue.main)
}
private func resolveNetworkInformation() {
bonjourBrowser!.browseResults.forEach { (result) in
/* result.resolve(with: NWBrowser.Resolution.parameters(NWParameters())) { (newResult) in
print("newResult: \(newResult)")
}*/
switch result.endpoint {
case .hostPort(host: _, port: _):
break;
case .service(name: let name, type: let type, domain: let domain, interface: _):
if netService!.delegate == nil {
netService!.delegate = self
}
netService!.resolve(withTimeout: 10)
break;
case .unix(path: _):
break;
case .url(_):
break;
@unknown default:
break;
}
/*NetService(domain: "local", type: "_dartobservatory._tcp", name: result.endpoint.
)*/
}
}
func netServiceDidResolveAddress(_ sender: NetService) {
if let addresses = sender.addresses {
addresses.filter({ data in data.count == 16 }).map { data -> String in
var hostname = [CChar](repeating: 0, count: Int(NI_MAXHOST))
return data.withUnsafeBytes { (ptr) -> String in
guard let sockaddr_ptr = ptr.baseAddress?.assumingMemoryBound(to: sockaddr.self) else {
return ""
}
let sockaddr = sockaddr_ptr.pointee
guard getnameinfo(sockaddr_ptr, socklen_t(sockaddr.sa_len), &hostname, socklen_t(hostname.count), nil, 0, NI_NUMERICHOST) == 0 else {
return ""
}
return String(cString: hostname)
}
}
.forEach { s in
print("\(s)")
}
}
}
}In let bonjourService = BonjourService(name: "com.example.websocketplayground")
while true {
RunLoop.current.run()
}Now the only missing part that I can't figure out is the way to distinguish between multiple devices while debugging on these devices at the same time. Maybe someone can take it from here? |
|
Can we just add a flag for a single debug device only for the meantime? This is already a great improvement |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
|
#118826 was temporarily reverted. |
|
#118104 is available on the master channel, and we would love some feedback! Setup
Caveats
Please file new issues, including usability suggestions, as you see them. Thank you! |
Submitted feedback |
|
#118104 is available on 3.7.0-24.0.pre and higher on the beta channel. If you are trying to test this you must either be on the master or beta channels, it is not yet available in stable. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |

Latest update: #15072 (comment)
Steps to Reproduce
connect iPhone via usb
Open xcode -> window -> devices & Simulators -> select correct device and enable connect via network
Network Symbol is shown in the list to the left
disconnect iPhone
Android Studio shows devices but if you try to run it it is in an endless waiting loop without visual indication
If you then connect the devices via USB it continues on
Logs
https://gist.github.com/phumberdroz/9700d43d2bc9f5e510bebc6dab9b509c
Flutter Doctor
The text was updated successfully, but these errors were encountered: