-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 deploy to iphone iOS 17.2.1 from VS 2022 #19738
Comments
Thanks for the issue report @bluebeenet! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS. If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
|
Im experiencing the same problem, except that I am using XCode Version 15.2 and Microsoft Visual Studio Professional 2022 (64-Bit) Version 17.8.4. I tried using an older XCode Version or just older Xcode command line tools. |
Visual Studio Community 2022 (64-bit) - Current Version 17.8.4 error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/tm/cvmpfvmd5rzbj3kxllwxvrpc0000gn/T/tmpsTuq0n.tmp device install app --device iPhone /Users/mauricio/Library/Caches/Xamarin/mtbs/builds/MauiApp1/c5f00f28fc519043c8b48615aef3bd17c3569b03515f36c03ce7903b6e35fb80/bin/Debug/net8.0-ios/ios-arm64/device-builds/iphone12.1-17.2.1/MauiApp1.app' returned the exit code 1. |
VS connected to Mac build host and I have the same issue. |
I found some news regarding this issue on developercommunity.visualstudio.com. A fix for this issue is now available in preview release. Try out the fix by installing the most recent preview from https://visualstudio.microsoft.com/vs/preview/ . Right now I can't yet confirm or deny that the solution works. If you try it out, please let me know if it works for you. |
Unfortunately I received the same error with the Version 17.9.0 Preview 3.0 as well |
Resolved |
Same problem here VS Enterprise 17.8.5 (64-Bit), Xcode 15.2 |
The issue is resolved for me with VS Version 17.8.5 and everything is working fine now. |
I'm having this issue on VS Version 17.8.6, xcode15.1 and xcode15.2 |
I have the same issue on my M1 Mac. Using Rider 2023.3.3, xcode 15.2 & xcode 15.3beta |
Same problem here, but I am already on VS 2022 17.10.0 Preview 1 and Xcode 15.2. What’s the solution now? This is blocking my own development. Recently just bought a new Mac to being able to develop again as got an error message that I need to upgrade to new Xcode which wasn’t possible back then. In the meantime it was working also with deploy, now again not working within a couple of days - real annoying working with all that |
If you get an error like this: copy the complete devicectl command, head over to the mac open a terminal window and execute it with xcrun like so: xcrun devicectl -j /var/folders/tm/cvmpfvmd5rzbj3kxllwxvrpc0000gn/T/tmpLjdv45.tmp device install app --device iPhone /Users/mauricio/Library/Caches/Xamarin/mtbs/builds/MauiApp1/c5f00f28fc519043c8b48615aef3bd17c3569b03515f36c03ce7903b6e35fb80/bin/Release/net8.0-ios/ios-arm64/MauiApp1.app You will get a useful error messages there. Most of the time it will be a provisioning problem. Don't know why it is so hard for Microsoft to show this error in Visual Studio, but it fits the whole MAUI disaster! |
Great hint 👍 I will try that |
As I deployed it with the same profile a couple of days ago, don’t know how anything could get corrupted. The profile is also not outdated as I created one from scratch just a week ago when I setup my new Mac. But, I will check this weekend |
Can also be Entitlements.plist related. Run the command on the Mac and you will have a better idea where to look for the problem! And in any case update to the latest VS Build 17.9.0! |
I already have a newer Version an am working with VS 2022 17.10.0 Preview 1 I do not have an Entitlements.plist file. Do I need this in my project? Not sure, what this does and where to place if needed |
This was perfect. Simply that I had not paired my device in Xcode - the error on VST wasn't much use at all - but this made it perfectly clear. Thank you! |
The command: xcrun devicectl -j /var/folders/tm/cvmpfvmd5rzbj3kxllwxvrpc0000gn/T/tmpLjdv45.tmp device install app --device iPhone /Users/mauricio/Library/Caches/Xamarin/mtbs/builds/MauiApp1/c5f00f28fc519043c8b48615aef3bd17c3569b03515f36c03ce7903b6e35fb80/bin/Release/net8.0-ios/ios-arm64/MauiApp1.app Is obviously for a app developed for net 8, I'm getting this issue with Xamarin.iOS, not Net 8 (yet). This release will be my final release for a Xamarin.iOS app, I'll be moving to Net 8, but in the meantime, I need to get this app out there and I can't even run it on my test device without getting this error. I started getting the error after updating VS 2022 from v17.9.6 to v17.9.7. I've created a issue in VS feedback, but they take time and time is not something I got, so any assistance anyone could provide here would be invaluable. Thanks, |
If you check the error in VST on windows, that xcrun is effectively a command being passed over to the Mac. Copy that specific bit, run it on the mac (as above) and you'll get a more descriptive error. Not sure .Net 8 has any bearing as such - happy to be corrected though :) |
Yes, figured it out, I was able to run the command in a terminal on the Mac, the error The command I ran is: xcrun devicectl -j /var/folders/s7/6kd65q7x25l_gls5ny90ylf40000gn/T/tmpuWSxA6.tmp device install app --device "Prescott's iPhone (2)" /Users/prescottchartier/Library/Caches/Xamarin/mtbs/builds/OML_iOS/925fc282e7624c296284fb3051c5d4c69f7dc7a0bdbfa5fe84b98a136988d552/bin/iPhone/Debug/device-builds/iphone14.5-17.4.1/OML_iOS.app The error is: The specified device was not found. (com.apple.dt.CoreDeviceError error 1000 (0x3F8)) I'm assuming that the device it couldn't find is the iPhone. The iPhone IS attached to the Mac, I can browse the iPhone via Finder and see all the information about the iPhone, not sure why it can't be "found", but it's definitely there. I cleared all trusted computers and re-trusted the iPhone from the Mac, no change. I created an issue with Microsoft, see it at here: R/ |
There were a bunch of new things I found this time around (haven't had an app on iPhone for a bit) which seemed to include enabling a new "Developer Mode" in settings, and then hooking it up to xCode (check the Devices and Simulators) where it then did a few things before being available. |
Well, that did it. I opened XCode on the Mac and when I did a "Trust" dialog opened on the iPhone. I of course selected trust and I was able to deploy the app. There must have been a change when I updated XCode the other day, otherwise I have no idea how that happened. In any event, I'm back in business. Thanks for the help. Oh, btw, I never did find "Devices and Simulators" in the XCode settings, fortunately I didn't need to find it. R/ |
Awesome, glad you found it. Devices and Simulators is in Xcode. Open that, go to the top and select the "Window" option from the mac and then it's there. It's very handy as you can get at some of the stuff stored on the devices. All the best, P. |
Ah, I see it now. Odd place to put it, one would assume that one would find it in "Settings". Nope, Apple does it their way. R/ |
Thanks you for this, sorted my iPhone deploy issue. It's been perfectly fine deploying in Flutter so assumed all was good. I'll keep an eye on this as maybe using XCodes to swap xcode versions cause problems but can deploy to sim and iPhone reliably now. |
Hi @bluebeenet. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Description
Unable to deploy to iPhone.
My iPhone is running on version 17.2.1 and Xcode is in version 15.0.1
VS: Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.8.3
error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/tm/cvmpfvmd5rzbj3kxllwxvrpc0000gn/T/tmpLjdv45.tmp device install app --device iPhone /Users/mauricio/Library/Caches/Xamarin/mtbs/builds/MauiApp1/c5f00f28fc519043c8b48615aef3bd17c3569b03515f36c03ce7903b6e35fb80/bin/Release/net8.0-ios/ios-arm64/MauiApp1.app' returned the exit code 1.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3
Affected platforms
iOS
Affected platform versions
iOS 17.2.1
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: