-
Notifications
You must be signed in to change notification settings - Fork 520
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
Unable to install or launch on device when device is not connected with a cable #21274
Comments
If the phone is connected to a device that occupies the Lightning connector, then the workaround isn't viable. We need to debug our app while using this hardware and cannot. Also, we only started seeing this when the phones were upgraded from iOS 16 to iOS 17. Apple changed the debugging infrastructure in iOS 17. I know that mlaunch was updated to match, but it appears that it doesn't work properly with wireless debugging. This might be related to the new "available" (but not connected) status that is seen when using devicectl. |
Can you try launching connected, and once the app has launch disconnect from your mac and connect your hardware? |
Starting the debugging session using the Lightning connector, then disconnecting the cable and connecting the hardware device, results in inconsistent behavior. Sometimes it actually works, but other times, the debugging session seems to disconnect, causing either the debugger or the app to hang. I appreciate your attempt to find a workaround, but it really would be preferable to have the Microsoft tools manage the wireless debugging connection. |
Same happens for me, debugging MAUI iOS apps is not possible for me now. I've seen the same behaviour, where I have to re-connect the device for it to work sometimes. But even if I do, I notice that pages that loads code that has breakpoints in it some times freeze the app. It freeze for a couple of minutes before it continue. When it does continue, hitting the breakpoint works 10% of the times. The change from my side was to install Xcode 16, but after reading this, I removed Xcode 16 and installed 15.4. I am on a M1 Mac: macOS 14.6.1. I am testing two iPhones: |
@haavamoa do you see this behavior with the usb cable connected, or only when disconnecting it after debugging has started? If it's the former, it's a different problem than this issue describes, so please open a new issue. |
I was not aware that this was the cause of this, because I disconnect / connect a lot during the day due to having multiple devices. So in short, it has been freezing all week and I haven't been able to understand that it is due to me disconnecting / connecting. But to give you a clear answer, I just rebooted my device with the USB cable connected. When it booted up, I started debugging without any issues. Once I disconnect it, and reconnect it, it starts freezing all over again. |
I did some research yesterday, I have no idea if this is the reason why this happens but it somehow seem to fix the problems with freezes / not able to debug. I started reading on Xcode 16 release notes, as the only changes I did last week was to upgrade to Xcode 16. It kinda makes sense, but I did remove Xcode16 so it kinda doesn't. But who knows, maybe there's some things getting caches somewhere....
So I started wondering if this is what I am experiencing. Tried the workaround when the app was in the "freeze" state after I've detached the USB, and both the freeze was gone as well as breakpoints are getting hit after I turn on airplane-mode on the device and turn off WIFI on the Mac... |
I am starting to believe my issues is not the same as this issue anymore. Created a separate issue for debugging using USB cable only. |
New commits in xamarin/maccore: * xamarin/maccore@c1a17a2f80 [mlaunch] Install and launch apps without using the AMDevice API for devices that devicectl supports. Diff: https://github.com/xamarin/maccore/compare/ad4af9cde4..c1a17a2f80 Fixes #21274.
New commits in xamarin/maccore: * xamarin/maccore@c1a17a2f80 [mlaunch] Install and launch apps without using the AMDevice API for devices that devicectl supports. Diff: https://github.com/xamarin/maccore/compare/ad4af9cde4..c1a17a2f80 Fixes #21274.
New commits in xamarin/maccore: * xamarin/maccore@c1a17a2f80 [mlaunch] Install and launch apps without using the AMDevice API for devices that devicectl supports. Diff: https://github.com/xamarin/maccore/compare/ad4af9cde4..c1a17a2f80 Fixes #21274.
New commits in xamarin/maccore: * xamarin/maccore@c1a17a2f80 [mlaunch] Install and launch apps without using the AMDevice API for devices that devicectl supports. Diff: https://github.com/xamarin/maccore/compare/ad4af9cde4..c1a17a2f80 Fixes #21274.
New commits in xamarin/maccore: * xamarin/maccore@c1a17a2f80 [mlaunch] Install and launch apps without using the AMDevice API for devices that devicectl supports. Diff: https://github.com/xamarin/maccore/compare/ad4af9cde4..c1a17a2f80 Fixes #21274. Backport of #21319 Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Apple platform
iOS
Framework version
net8.0-, net9.0-
Affected platform version
All
Description
mlaunch is unable to install or launch an app on device unless the device is connected with the USB cable, even if "Connects via Network" is enabled in Xcode.
Steps to Reproduce
mlaunch will say:
Did you find any workaround?
Use the cable.
Relevant logs
No response
The text was updated successfully, but these errors were encountered: