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?
in my project this problem happened because there was a folder with symbolic link. I removed that folder and it worked properly.
My problem was I had initially installed the app using a different set of developer credentials on the device. Deleting the app from the device fixed it.
Tried all of the above answers: Deleting the app, clearing storage space, cleaning the project...
What finally worked was bumping the build number in info.plist (General > Build)
For me it was the provisioning profile - I used distribution instead of development
This looks like another time waster courtesy of Apple's amazingly high class development team. On iOS11 Xcode9 (pick your beta, any one works) this will happen randomly. Appears to be more frequent if you dare to switch apps while compiling. Just build again and stare at xcode - it'll work the second time without fail in my experience.
remove all certificates from keychain tickon automatic xcode manage profile,
Restart Device
Delete derived data
clean
Run