I searched all resources last day and didn't get a successful result. Please take it into consideration that I could test with this device a few days ago. But today I didn't do. Also I tested this iPhone with another mac, the result is the same. The device is an iPhone 6s.
I did the following things:
-restart Xcode
-restart mac
-restart device
-clean& build project
Please help me for solving this problem.
1:
I had the same problem and I restarted my iPhone. Now it's working.
Problem was due to device OS version.I just updated device version to 11.0 and restared device.Then problem solved.Hope this comment will help to someone
For others also dealing with this problem and couldn't find anything that worked for them. I fixed it by restarting my MacBookPro.
~~ What I tried ~~
Restarting the iPhone did not help, tried it 3 times.
Uninstalling and reinstalling the app did not help.
Changing the Wi-Fi did not help.
Restarting Xcode did not help.
Unplugging and replugging the iPhone did not help.
Disabling "Connect over network" in Xcode did not help.
~~ What I checked ~~
Xcode is the newest version.
iOS is the newest version
I couldn't try another Mac cause I only have one.
I also only have one cable.
I only have one version of Xcode installed.
Please check the following notes:
Make sure to answer the trust this Mac when you attached the device; If the device is not trusted, it effectively shuts down communications between the two devices.
Try any different cable.
Check if you have 2 different versions of Xcode installed in your machine.
Apparently, this error can occur because of multiple issues. In my case, when I restarted the iPhone, it asked me to re-enter password for my apple id. Once the password was verified, I was able to run the application on the iPhone.
Error happened to me because my iPad was full on disk space. I was unaware of this until I restarted it.
I had this issue happen to my iPad 3 on iOS 9.3.5 I just needed to reboot the iPad and allow it to show me an "activation lock" screen (for some reason) that I simply had to reenter my iCloud password into. Also, it showed me the "storage almost full" message on reboot
Related
I updated my Xcode to Version 12.4 (12D4e) and after that I am unable to run my app on my device
iPhone X iOS 14.4.2.
Its alway show this Error
When I check my device connected status, Its show as connected
Action I applied
Clear DerivedData folder.
Unpair device and connected again.
Drank 20+ coffees.
I was able to fix the Xcode 12 app install/deployment issue described above:
Failed to start remote service "com.apple.debugserver" on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
DVTRadarComponentKey = 261622;
}
...
by doing the following steps:
Quiting Xcode.
Deleting Xcode cache directory (ie, rm -rf ~/Library/Caches/com.apple.dt.Xcode).
Rebooting the offending iOS device.
Connecting the iOS device to Xcode by cable (instead of wireless network connection).
Starting Xcode again.
By the way, I've a setup very close to yours:
Xcode 12.5 (build 12E262) and
iOS 14.5.1 (on a iPhone Xʀ device)
1st solution
I fixed this by:
Closing Xcode
Deleting the current iOS version in my folder that's related to my device.
~/Library/Developer/Xcode/iOS DeviceSupport
Restarting Xcode. Wait a little bit for it to refresh and copy cache files in my case then Run.
Based on Can I delete data from the iOS DeviceSupport directory? it's ok to delete the iOS DeviceSupport folder.
I noticed when I did it and reconnected my device it re-downloaded the iOS device Support files.
If the support files don't download and the cache files are not copying, try restarting your computer as well.
I started also getting this error:
Errors were encountered while preparing your device for development.
Please check the Devices and Simulators Window.
Restart your phone and reconnect it to the compter if this happens. Then you should get a message in Xcode saying:
Preparing your phone for development.
2nd solution
Unpair the device in Xcode.
Clean the project.
Unplug and then restart iPhone.
Restart Xcode.
3rd solution
If none of the above worked, I was able to run the program by re-enabling Connect via Network.
After doing this now I can run project via USB.
4th solution
I submitted this bug to Apple. Apple also suggests this can be caused by faulty data cords. Maybe try another cord as well.
Unplug the iPhone, Turn it off and again turn it on and reconnect. It worked for me. Sometimes iPhone Debug connection network server clogs up. When you restart iPhone it reinitiate the connection.
This issue keeps happening and it seems like there's a myriad of reasons that may cause it, and so there are a lot of solutions that fixed it for people. Someone even suggested that none of the fixes actually work, and it's only the fact that time passes as we try different solutions that actually fixes it. Nevertheless, I will share what worked for me and what I found so far.
a. In the past, the issue was most often caused for me by using an older version of Xcode with a newer iOS. Apple doesn't always release the version of Xcode that supports the latest iOS at the same time, and this issue sometimes happens as a result of that. There are people who suggest right clicking the Xcode App > Show Package Contents > Developer > Platforms > iPhoneOS.platform > Device Support and renaming the folder for the latest supported version to the one running on the phone (for example renaming 16.0 to 16.1). I've had better luck with using the Beta of Xcode if it's not out yet (in this case using 14.1 RC2 instead of 14.0.1).
b. Incrementing the build number and setting a Display Name. This seems to have fixed the issue after nothing else worked. Again, this seems very random, so it could be unrelated, but it did fix it in my case after nothing else suggested on all the threads about this worked.
c. Deleting the profile in Settings > General > VPN & Device Management
Other suggestions I've seen across threads:
Restarting the device (seems to be the most popular solution)
Unpairing the device
Checking device status under Window > Devices and Simulators. There may sometimes be some further info about what is going on here, the device may still be preparing for development or downloading symbols or whatever
Using another cable. This never worked for me, after trying with 3 cables, 2 from Apple and one 3rd party, but others reported it worked
Deleting Derived Data (use Dev Cleaner or rm -rf ~/Library/Developer/Xcode/DerivedData
Uninstalling the app manually from the device
Resetting Network Settings
Force restarting the iPhone
Apple really needs better errors and less ridiculous bugs like this.
I had to update Xcode to fix this issue because my version of Xcode did not support my up-to-date iOS version.
I've had the same issue and also had the problem that I wasn't able to connect my device by cable (it popped on and of), so I had to use wifi connection on Xcode.
I was able to see the icon of the app created by Xcode on my iOS device, but whenever I tried to start it, it won't do so giving the "Untrusted Developer" error message.
I fixed this by going to:
Settings > General > VPN & Device Management > Developer App
Here you have to chose the App and consent to trusting it.
I reset the iPhone network settings and it works!
I have the same problem, my solution is update my ios version(15.1 to 15.2 beta)
I tried all the resolvent, nothing worked
restart iOS, Xcode, macOS
clear DeviceSupport, Caches
unpair iphone, change lighting cable
Then I find my ios version(15.1) does not exist in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.
I try to fix it, but failed.
Finally, I can only update my iOS device to 15.2 beta version, It solved! Xcode is update to beta version too.
My devices original version:
iOS 15.1
Xcode 13.1 (13A1030d)
I'm on Xcode 13.3 and I fixed this by unplugging and plugging the cable between my MacBook Air and my mini iPad 3.
I fixed it by,
Following the steps : Window > Device and Simulator > Select your device and Right Click on it > Unpair after that re-connect your iOS Device then boom... Clean builds and run the app, it will work for you.
Upon solutions aren't working for me. Restart my iPhone then all well done.
I'm trying to run application on my iOS 9 iPad with Xcode 7 and it gets stuck on "Validating application".
Screenshot:
Reboot your mac and/or restart Xcode. Fixed it for me.
I had to restart my iphone also.
I restarted mac, ipad, xcode multiple times, deleted derrived data and after many unsuccessfull tries, I was able to run my app on iPad.
Disconnect and reconnect the data cable is worked for me. No need to reboot the iphone/ipad or Mac
If you are not planning to release on AppStore and only creating an ad hoc build for testing, then do the following:
In Xcode 7, Goto Product -> Scheme -> Edit Scheme
From the left menu select "Archive" and Select "Distribution" from the "Build Configuration" drop down.
I ran into the same issue with Xcode 8.3 and iOS 9 on the phone. Tried restarting Xcode, computer, the phone- none of them works.
Turns out, the phone was connected to a Wifi network without internet access. As soon as I connected the phone to another wifi with internet, the app installed fine.
The working theory is that the phone tries to do run validation against some remote Apple server, which fits the "Validating application" message. It's very unhelpful that it never times out or produce any meaningful error message, though.
XCode 8.3, iOS10 here. Tried most solutions without much luck
X-Restart phone
X-Restart mac
X-Check WiFi (was connected to internet)
X-Unplug cable (tried both ends)
O-Plug cable into a different USB port
Hope that's an option for you!
I didn't want to restart Xcode (as I wanted to maintain my undo buffer), but found the following worked:
Unplug the cable from iPhone
Uninstall the app from iPhone
Perform clean in Xcode
Plug phone back in
Set phone as the active target
Build
Run
When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it's not locked at all. How do I fix this?
My phone was set to "trust" the Mac, and I still ran into this error with Xcode 6.1.1.
This worked for me:
unplug device
quit xcode
open xcode
plug in device
build/run
Did you by chance not "trust" the device? This will prevent it from communicating with xcode even if the device is unlocked.
Update here's a support doc from Apple: http://support.apple.com/en-us/HT5868
I recently ran into this issue with XCode 8 just after updating my device from iOS 9 to 10. The exact error I received was:Development cannot be enabled while your device is locked. Please unlock your device and reattach. I received this error even when my phone was unlocked, and after unplugging and re-plugging in the device.
As is mentioned in several answers, the device is locked message is actually referring to the device not trusting the MacBook. In my case, I think my phone defaulted to not trusting my computer after updating to iOS 10. Here are the steps that worked for me to reset the settings (this is the same process that is mentioned in the Apple support page in tehprofessors' answer):
Disconnect your device from your MacBook and close Xcode.
On your device go to Settings > General > Reset, then tap Reset Location & Privacy
Plug your device back into your computer, and on the device you will be prompted to trust the computer. Tap trust.
Now reopen Xcode and rebuild the project.
The device locked error should disappear.
From the Window Menu in top bar of Xcode, select Devices and Simulators.
(or Press SHIFT + COMMAND + 2)
Then select your device, right click and select Unpair.
Once you do this Trust or Don't trust will appear on your device.
Trust the device again and it will begin preparing it for Development.
Wait for Xcode to pair device for development and then you are good to go!
I ran in to the same issue even though i selected "Trust this computer" option first time.
This worked for me
Lock the device
Remove cable from device.
Unlock the device
Connect again to Mac
2018
The fastest way for now i found is:
1) Go to Window -> devices (changed the hotkey in xcode to CMD+P for me)
2) Press unpair on the device.
3) Press trust in iPhone.
4) Build again or Run without building (Ctrl+CMD+R)
Rebooted my iPhone, and that fixed it for me.
I tried every answer on this page (7 at the time, though 2 are duplicates) and they were all unsuccessful for getting rid of this Xcode error for me.
I have a very simple solution which worked for me instantly. Takes some 10 sec to do:
1) Go to Window -> Devices & Simulators and untick Show as run destination
2) Unplug the cable and plug it back in.
3) Run the project.
This should be solving your problem!
For anyone who need a logical answer..
Go to Window -> Devices & Simulators. Right click on your device & unpair it.
Disconnect from cable & reconnect.
Wait for it & let Xcode detect you device.
Run the project.
Make sure you TRUST on your iOS device and enter any passcode.
For those who has this issue in Xcode 9:
Simply restarting Xcode should solve the problem.
This happens at times while using Xcode 9.
There are multiple solution to this as mentioned below :
Note : Make sure that your device is not locked when Xcode is trying to install app.
Solution 1 :
i. Disconnect device and connect again
Solution 2 :
i. Restart you device
Solution 3 :
i. Disconnect device
ii. Quit Xcode (Shortcut key : cmd + Q)
iii. Open your project
iv. Clean project (Shortcut key : cmd + shift + K)
v. Now connect device
vi. Run your project
For me Solution 3 worked perfectly
A simple solution:
First, unplug your device.
Now, unlock your device and plug it in again. Be sure that the device is unlocked.
Now run the Xcode project by selecting the device as target.
When you plug in your iPhone, it will ask you to trust the computer.
If you already trust and unlocked but still said your device was locked (bug). Just unplug and plug again then it will work
These steps worked for me in iOS 10.
Remove the cable from device.
Plug in the device.
Clean and build the Xcode project.
There is a simple way to resolve that. At least it works for me.
In your iPhone Device
Go to Setting > Developer > click in “Clear Trusted Computer”
Type the passcode required
And done!!!
The simplest way that I found.
I run into this problem quite often (at least like 5 times a week). Almost every time this happens, a Xcode restart fixes it. But this time nothing seemed to work including:
Restarting Xcode;
Unplugging and re-plugging the iPhone;
Cleaning the project (cmd+shift+k);
Cleaning derived data (cmd+option+shift+k)
Done dozens of times in all sorts of different orders.
What fixed the issue for me this time was simply:
✅ Rebooting the Mac.
Recently I have met the Xcode shows "development cannot be enabled while your device is locked, Please unlock your device and reattach. (0xE80000E2).
If your iOS device is already unlocked and connected to mac and still get the error from Xcode 8.1 after upgrading to iOS 10.1.1, then the mac is not trusted by the device.
To fix it, first disconnect device to mac and then go to iOS settings app, and open general->reset->Reset Location & Privacy.
Then connect device to mac and when prompted, set select trust the mac.
Then wait the processing symbol files within your device and mac. After it finished, you can run the project to your device. It will be working.
I spent hours trying to fix this issue with no luck.
BE SURE TO DISABLE ANY VPN SERVICES FROM YOUR IPHONE. Just like magic, it started working properly.
This issue is not about "Trust" or not. It's a bug in Xcode.
Just follow these steps.
When Xcode is running and your device is connected:
Lock your device.
Unplug your device from Mac.
Unlock your device.
Plug your device back to Mac.
Solution: Switch target device to some other (e.g. Generic iOS Device),
then unlock you physical device and switch back to it again.
Generally just unplugging/replugging seems to work for me. But today it didn't and something else seems to have worked: I have enabled network debugging on the device in question and it almost looked like it remembered an old network "lock" setting, while not seeing that the device was actually connected via USB. After (temporarily) de-selecting "Connect via Network" and replugging, it got things working again.
there are two solution worked for me.
1) disconnect your device from the mac and reattach it.
2) disconnect your device from the mac and restart it and then connect it with mac it'll work
sometimes your device stops trusting your PC for no reseaon. go to your settings then general > reset > reset location and privacy. and replug your device to your PC again and press "trust this device" prompt that shows up in your phone.
Lots of answers, but the one that worked for me (El Capitan, Xcode 8.2) was to close iTunes. If that has a connection to the IOS device then although Xcode can load the app components it will still fail to run it.
On your device (iPhone/iPad) goto: Settings -> Developer -> Clear Trusted Computers worked for me.
I found that by shutting down a Console and a running Simulator allowed XCode to see my iPhone again. I'd make sure other related programs aren't running if you don't need them.
This can also happen due to pending update on your device. This also means you need to update your phone, connect to the MacBook (trust it if needed). This how I found my problem and solution.
One possibility worth checking, if none of these other solutions work, is that there is no space left on the device. Xcode will not give you a helpful "device full" error to tell you that your device has no storage space left, but it will also not be able to deploy an app build to a device whose storage is full. The only solution in that situation is to delete media or other apps/data to free up enough space.
Bizare, but I hope it helps someone.
I was connected to a VPN (Pro XPN) and that was causing the issue! Disconnected and it worked.
Another fix to this problem is to connect your iPhone with your Xcode open while your iPhone is in the homescreen, not in lockscreen or with an app opened.
I'm trying to test out my app on my ipad and when I decide to run it on my ipad, Xcode says that it's successfully built. On the top, it says that it's runnning the app, but nothing happens for 2-3 minutes. Finally, I get two screens popping up saying "An unknown error occurred." I have tried running other apps through Xcode on my ipad and they work fine. I also decided to exit Xcode and restart everything, but the problem still exists. Does anyone know what the problem is?
Not sure if this will be useful but
Xcode Version: 5.1.1
Ipad Version: 7.0.4
Mac OS X 10.9
I found one approach:
Before this approach make sure that you have all certificates and other documentation updated.
I have faced same issue, now I have a way to fix this. I am using iPhone 5 with OS version 9.1
First, delete the app from your device and then restart the xcode by force quit and then again open it. Now clean your project and run the project in your device. Now it will be run without any issue.
Close your simulator or unplug and plug back in your device, and re-select the device target.
In my case . I cleaned the product and rebuild it and it worked.
Sometime is you forget to unlock your device.
I just downloaded Xcode 6 & played with it a bit.
After switching back to previous version of Xcode and running in simulator, I keep getting this error.
Unable to determine simulator device to boot.
How do we resolve this?
Thanks in advance.
Make sure you have only one iOS Simulator instance running in the Dock.
There was a simple answer to this for me:
Open the simulator via Xcode -> Open Developer Tool -> iOS simulator (even if it can't launch, the app will be open).
With the simulator app open, go to Hardware -> Device -> Manage Devices.
Add any missing simulators with the plus button (all of mine were missing for some reason).
I've faced same issue and solved by below steps:
1) Move xcode6-beta into application folder
2) Restart mac and open xcode6-beta from application folder.
I had the same problem when running from Xcode 6 beta selecting iPhone 5s. If I choose iPhone 5 or "resizable iPhone" then my app launches fine.
You will not see the profiles of simulator without a rebooting of OS X.I added simulator for many times,when the rebooting finished, it shows on the device list under the simulator bar. I think this is a bug of Xcode 6 Beta
I think you have 2 simulator running in the dock. Please close another one simulator and run the project again. It might helpful for you.
In my case I had such a message just because the simulated device was still booting (longer than usually, I guess). Xcode 7.2.
(This is not actually an answer to this specific question, but I came here googling the message in the title, so I am writing my note here for if someone else gets the same case as I did)
My case wasn't about having two simulators open. It was just because having instruments open as well. Closing Instruments resolved the issue
I just fixed the exact same problem by removing the beta version and rebooting the computer.