Reputation: 47348
I've just updated to Xcode 9 and am getting App installation failed Could not write to the device
error popup every other time. I see there are older questions on the subject, but this one is particular to iOS 11 and Xcode 9. I've never had the issue before.
How do I make sure Xcode 9 can install app to device every time?
Upvotes: 42
Views: 17788
Reputation: 983
In my case, this issue appears when I added a folder as reference in the project which contains a symlink. Removing the symlink fixed the issue.
Upvotes: 1
Reputation: 639
I tried all the method , they didn`t work for me .
And I fixed the problem by removing the soft link file made by ln -s
Upvotes: 2
Reputation: 609
I had the same question that could be solved by deleting other debug App from my iPhone, then it worked.
Upvotes: 0
Reputation: 95
Xcode 9. iOS 11 SDK. Watch SDK 4.x.x - OPEN THE WATCH APP on the iPhone after failed. My Watch tab->(scroll down to the bottom)-> Install your app. Hope this helps. Just need permissions from the "Watch" app.
Upvotes: 0
Reputation: 9734
I got this issue App installation failed - Could not write to the device
and I solved it by doing the below steps
It worked for me.
Upvotes: 0
Reputation: 389
Hope the following steps will be useful for others,
Cmd + <
shortcut.Tadaa! now you can run the app in your device flawlessly.
Happy coding! :)
Upvotes: 1
Reputation: 1
Sometimes the problem arises when you removing some pod file reference. The only way to solve this in also your pod-file
eg: use_frameworks!
pod 'KYDrawerController' pod 'GoogleMaps' pod 'GooglePlaces' pod 'Alamofire' pod 'Firebase' pod 'Firebase/Messaging'
remove the unwanted file in this place. And also reinstall the pod-file again and open your project it surely works for you.
Upvotes: -1
Reputation: 416
I am facing same issues on my iPad. It was working fine before. But after some time my development version stop working on iPad. I have tried and search on internet but not able to find solutions. I have tried all above cases but no Luck.
At last, I have found solutions. Some developer has changed DATE/TIME settings for my Ipad. Please check date/time because my Provisional profile for apps has expired for the manual date set on iPad.
Upvotes: 1
Reputation: 351
What worked for me:
delete the app from iPhone
clean the code in Xcode
quit Xcode
re-open Xcode, connect my iPhone, and run it again
Upvotes: 0
Reputation: 2367
Xcode 9 seems to have many different manifestations of this problem. Some of the other answers address specific problems, but this definitely occurs when there is nothing wrong with your project. These steps always resolve for me (in order from least painful to most painful):
If all else fails, once a full restart fixed it for me. But probable something else was the root cause.
Hopefully Xcode fixes these problems soon...but I'm not hopeful.
Upvotes: 5
Reputation: 36447
I had similar issue and got is solved using below steps :
Delete app
from deviceDisconnect device
from systemRestart iPhone device
and Xcode
Clean your project
(Shortcut key : cmd + shift + k
)Rebuild
your projectUpvotes: 1
Reputation: 517
In my case the problem appears while I use manual signing and try to debug the app in Release mode. Although the fastlane builds and uploads fine in this mode fine, direct XCode debugging fails with the error "Could not write to the device"
. Temp switching to automatic signing mode fixed this issue.
Upvotes: 0
Reputation: 1
When I choose the Automatically manage signing, my problem fixed.Hope my answer can help you.
Upvotes: -1
Reputation: 171
I actually had to reboot the system on the Mac, this gets me rid of the problem for a good while, but it eventually comes back. None of the other solutions mentioned here worked for me.
Upvotes: 0
Reputation: 51
Everyone is solving this problem in a different way. Mine was changing executable name, building the app (throwing the "You don't have permission etc." problem) and changing the executable name back to the original value. I don't know why but it worked.
Upvotes: 0
Reputation: 13302
In my case this issue was caused by using App Store distribution certificate while iPad was connected wirelessly. Switching to development certificate fixed the issue.
Upvotes: 7
Reputation: 2072
Mine occurred when I had not signed in using my itunes developer portal credentials to sign into XCode. When I did it and cleared all derived data, it worked out.
Upvotes: 0
Reputation: 47348
The solution that works for Could not write to the device is clicking the run button again after dismissing this error message.
In some cases I get the error App installation failed: unknown error. In this case I need to do a clean before building.
Deleting the app from device also helps.
Upvotes: 1
Reputation: 3455
In my case, I want to testing watchOS app and I set the debug provisioning profile to release one. I set to automatic and the issue is gone.
Upvotes: 2