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.
failed to prepare device for deployment
All reboot, restart, unpair, etc. approches were to no avail. Re-installing XCode to a previous version worked.
I succeeded after everything updated to the new latest version.
- iOS on my device
- Xcode
- Mac OS
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 :)
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.
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.
SOLVED!!! It's matter of missing Provisioning Profiles in Developer Area. See Certificates, Identifiers and Profiles.
Working development environment:
- macOS 12.5
- Xcode 13.4.1
- (iPhone 7) iOS 15.6
Yesterday (2022-09-13) updated to:
- macOS 12.6
- Xcode 14.0
- (iPhone 7) iOS 15.7
Result: Xcode 14.0 says about iPhone it "failed to prepare device for the deployment".
Downloaded Xcode 13.4.1 xip package, unpacked it (xip -x), copied to /Applications. Started Xcode 13.4.1, it immediately was able to work with my iPhone 15.7. Deployed project to it. Quit Xcode 13.4.1, opened Xcode 14.0, now it was able to work with the iPhone.
I had the same issue with Xcode 14, and a device running iOS 15.7. Two different macs (running the same config), tried rebooting both and the device, nothing worked. What fixed the issue was installing Xcode 13.4.1 and preparing the device with it.
Guys solution is top answer on stackoverflow: https://stackoverflow.com/questions/71618452/failed-to-prepare-device-for-development-with-xcode-13-2-1-and-ios-15-4-devic
1: Check /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for directory name of your iOS version). EG: 16.4.1 2: If the directory is missing download support files for 16.4.1 (your iOS version) from https://github.com/filsv/iPhoneOSDeviceSupport and place it in the above path. 3: Restart Xcode.
Worked for me with ios 16.4.1(a), xcode 14.2, macos 13.3.1
This problem occurred for me when my iphone automatically updated from 16.1 to 16.4.1(a)
This error shows because of iPhone OS version is not supported by Xcode that's why this warning popped up, so check which max ios version is supported by Xcode which you are using.
In my case, the Xcode version is 13.1 and my iOS version is 15.4 so what I did, First downloaded device support version 15.4 from here (Download according to your device version) and added this to my Xcode.
steps to add the file in Xcode:-
-
Go to Applications > Right click on Xcode and Select Show Package Contents > Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport.
-
Extract your device support file to DeviceSupport Folder.
-
Restart Xcode and unplug and plug in your device.
As seen on StackOverflow post by Rajni