-
Notifications
You must be signed in to change notification settings - Fork 11
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
Can't launch app on a real device #18
Comments
You can try running the failing |
It says:
|
The DeviceSupportError reported seems very relevant. Do you have the correct version of Xcode installed that support your device's iOS version? If yes, need to debug further why ios-deploy can't find the DeveloperDiskImage for your device. |
I‘m using the latest Xcode every day. And it's not a beta version. So the version should not be a problem. After checking the Xcode.app content, I found that there is no iOS 17.2 DeviceSupport in But there is an SDK for 17.2. As I know, the current version of Xcode needs to download platform dmg after installed. Maybe the DeveloperDiskImage you need is there. |
Could you please try using latest ios-deploy directly. If the issue still persists, it might be useful to create an issue on ios-deploy. If it gets fixed, we need to update ios-deploy here. |
OK! I will give it a try this weekend. |
I found this issue ios-control/ios-deploy#588 It seems iOS-deploy is not supporting Xcode 15 now. Because "Apple has FINALLY created a non-hack mechanism with devicectl". So maybe we can just switch to devicectl. xcrun devicectl device install app --device 00008110-001XXXXXXXXXX ./xgen/Build/Products/Release-iphoneos/nilo.app
xcrun devicectl device process launch --device 00008110-001XXXXXXXXXX file:///private/var/containers/Bundle/Application/1604D2D5-35F3-4E43-8B47-1DEF5D778480/nilo.app This first command should give you the file URL for the second command. I tried it out. It works perfectly. |
This is unfortunate. We do use ios-deploy for other actions such as starting the debugserver as well, which I believe devicectl does not yet support. |
Is it possible to only use devicectl to launch the app for now? |
Even if launching works with devicectl, my hunch is that debugserver etc won't work as it also requires the developer image. We can try out by replacing launch part to devicectl, but not sure how much value it adds by simply launching if it fails to start debugging? |
Oh 😭. I'll check if there is any alternative way to launch the debug server. I'll tell you if I managed to find any. |
Right below the devicectl part, there is someone who suggested using pymobiledevice3 to connect LLDB. ios-control/ios-deploy#588 (comment) It seems to work perfectly on my device. |
This is good that we have a solution! Have a look at Couple of additional thoughts:
Happy to discuss on the design more or take in PRs in this direction. Though, if we know a fix for iOS 17, thinking if it would be possible to fix |
I don't quite know how to develop a vscode extension. Nether typescript. But I also thought Python in an extension might be tricky. I'm looking at the source code of ios-deploy. Almost all the stuff is in a giant 3896 line file. It's kinda scary. I am mainly working on Swift. OC/C/C++ is not very familiar to me. Let me see if I can understand the code. 😂 By the way, is the ios-deploy well maintained these days? If it has been somehow abandoned, maybe it's better to migrate to pymobiledevice3 from now on. |
It seems I found the code in ios-deploy which locates the device support image. Let me see if I can inject some code to make it work temporarily. |
Oh, I had a problem immediately. I can hard code the dmg URL, but it still won't work. Because for all the "DeveloperDiskImage.dmg" before iOS 17, there is a "DeveloperDiskImage.dmg.signature" file. Which is required to mount it to the device. But for the new ones, I can't find any. I'm stuck now. It seems Apple is using ".trustcache" files instead of ".signature" files. I can't find any document for it from Apple about how to use it. It's beyond my ability. The new disk image is located at "/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg". Inside the dmg file, there is "/Volumes/Xcode_iOS_DDI_Personalized/Restore/022-15428-264.dmg". That is the new iOS 17 disk image. And there is a "022-15428-264.dmg.trustcache" too. |
I did find how pymobiledevice3 solved this issue though: https://github.com/doronz88/pymobiledevice3/blob/master/pymobiledevice3/services/mobile_image_mounter.py And other people from libimobiledevice discussing it: libimobiledevice/libimobiledevice#1452 Maybe ditching ios-deploy is the right way. |
I'll continue trying to learn how iOS-deploy and pymobiledevice3 work. And see if there is any way to make ios-deploy work with ".trustcache". I can also research other solutions. (That's the only thing I can do because I know little about front-end stuff and extensions). Meanwhile, you can check if it's reasonable to embed pymobiledevice3 in the extension. In either way, we can make progress. Feel free to tell me if you have anything you want to test. 😊 (Today I also tried facebook/idb, libimobiledevice/ideviceimagemounter, etc. None of them support iOS 17+ now.) |
I required the automation script made by sk2122 from the original iOS-deploy issue. Maybe we can use some of it. ios-control/ios-deploy#588 (comment) |
It seems we have a new tool to connect to LLDB in XCode 16 Beta! |
Simulator works. But real devices are not. The app installed successfully but can't start the debug server.
Log below:
(Device UUID are fake for privacy.)
The text was updated successfully, but these errors were encountered: