In Xcode 6.3, I got this error when trying to run an iOS project written in Swift on a real device.
App installation failed
could not write to the device.
I tried to clean the project and run again, but the same error occurs.
How can I fix this error?
If you are using a free developer account you may need to uninstall some other apps you have signed.
This error has many potential root causes, as can be seen by the large variety of suggested answers. The best approach to troubleshooting app installation issues like this one is usually to inspect the console of the iOS device itself, as that'll often provide much more specific error messages. In Xcode open the 'Devices and Simulators' window and take a peek at the logs of the device where your app is being installed.
In my case, the "Could not write to the device" error was being caused by this:
Which clearly hints at what's actually going on. I had forgotten to set an
Info.plist
file for my dynamic framework target (used by the app).I turned off the device and turned it on again after which I did not get such error.
Check the device date, my device time was set to a future date so I was facing this issue.
Nothing helped me. I followed the below steps,
Finally I got it working!!
For me the following did not work on iOS 11 beta 10, XCode 9 beta 6:
Deleted Derived Data and voilá, it worked again