I have an iphone xs running public beta 13.5. I have tried running an app I've been working on on my phone and I keep getting a "Failed to prepare this device for deployment" error. I have tried with both the app store version of xcode as well as xcode beta 11.5 beta 2 (11N605f). I'm also using the free provisioning account.
Any help getting the app to deploy would be appreciated.
Replies
I succeeded after everything updated to the new latest version.
- iOS on my device
- Xcode
- Mac OS
-
forgot to leave each version..
iOS =15.3.1 (iPhone SE 2ndGen),Xcode =Version 13.2.1 (13C100),Mac OS =Monterey version 12.2.1 (21D62)
OMG, this is so awful. I was able to plug in my iPhone directly into my laptop running Xcode and was able to run an app i'm building from Xcode no problem. I then tried my wife's iPhone, nothing. I mean....nothing. Both phones have the exact same version of iOS installed.
Rebooting the laptop, rebooting the phone, restarting everything, and still nothing. I keep getting the "Failed to prepare device for development, please unlock and reconnect your device", which I've tried countless times to no avail.
How can things be broken so bad?
Same thing. Everything is updated, rebooted, and reconnected. Still doesn't work. I hate it
Hey everyone,
For anyone still having this issue now, check this top answer on stackoverflow :
Worked for me :)
-
Thank you, this is the only fix that worked for me.
I found solutions here, this is perfectly worked for me
- First check compatibility version for xcode with iOS version from following https://developer.apple.com/support/xcode/
- Now check the list of devices support to your Xcode from 'Device Support'
- To get into 'Device Support' :: Open Finder -> Applications -> Scroll to Xcode -> Right Click -> Show Package Contents -> Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport This is the list of devices folder support for your Xcode
- Now check for your iOS version from iPhone device :: Open Settings from iPhone -> General -> About -> Software Version
If the 'Device Support' folder does not contains the folder of your iPhone iOS Version, then you need to add respective folder from following link https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
- From above Github page, select device version & download zip file
- Now extract file & you will get the folder for your iOS version
- Copy this folder into Finder -> Applications -> Scroll to Xcode -> Right Click -> Show Package Contents -> Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport
Disconnect device (if connected), restart xcode
- Before connecting device, delete derived data from xcode & clean cache using cmd + shft + k. Then make sure to reset 'Location & Privacy' from device :: From iPhone device go to Settings -> General -> Transfer or Rest Phone -> Reset -> Reset Location & Privacy -> Enter passcode to continue
- Now connect your iPhone device with macbook (through cable), xcode will detect your device & you can run your application
check out following link
Rebooting both devices does the trick for me, but would be nice for a fix so that all this rebooting doesn't have to constantly occur every time I want to work on one of my apps. Rebooting to fix issues is time consuming and annoying, rebooting to fix issues is such a "PC/Windows" thing to have to do. Part of the reason I love my Mac so much over my Windows PC was because I got away from stuff like this.
-
I am so with you... and unfortunately 20 reboots later, 'reboot everything' still doesn't work for me. To make matters worse the few times I've gotten it to work over the past few years, it then STOPS working again pretty quickly.
Hey, Apple Team... Are you EVER going to make this work reliably? Clearly this has been an ongoing issue for lots of developers. It's certainly been an ongoing issue for me.
It feels like your dev team is happy with the "Have you tried turning the computer off and on" answer for this... Which... would be embarrassing, even if it worked reliably.
It does not.
You own all the hardware and software. Please fix this so it works AT ALL RELIABLY.
-
—
flashbruce
Add a CommentHope this may be a partial answer for some.
I was having this issue big time with two of my iPad's. I was using Xcode 13.1 for one project because it uses SwiftRealm, which is not compatible with 13.2.1 (due to a compiler version issue). But having read some of the responses here, I decided to try to see if these iPads would be able to get updated for developer use if I used the Devices window on Xcode 13.2. Indeed that worked for both of them!
(I also have some kind of issue where Xcode asks me over and over for access to my Downloads folder. I always agree, but it doesn't seem to matter much.)
So then I went back to 13.1 to see if I could now download the app that uses RealmSwift onto the iPads. Though they are both iPad Air 2's, it worked great with one, but the other is giving me an obscure error where it says it is unable to download it because of some version mismatch, which it wanted me to report to Apple if the message was not correct. And when I retried it, it went back to saying that iPad could not be prepared for development.
Then, with this second iPad, I went back to the 13.2.1 Xcode, which was perfectly fine with downloading code to it, after I agreed that it could access the Downloads folder (again). And when I went back to 13.1, this time the second iPad worked as well.
So now they are both working with my 13.1 app, at least for the moment. Surely something is flaky here, but I can't quite fully describe it.