App installation failed: Could not write to the de

2020-05-24 18:55发布

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?

30条回答
Root(大扎)
2楼-- · 2020-05-24 19:18

My issue was an embedded framework.

Go to "Build Phases" -> "Embed Frameworks" -> Check "Copy only when installing", and it got rid of the issue for me.

enter image description here

查看更多
【Aperson】
3楼-- · 2020-05-24 19:18

I am facing same issue then solved out follow this step and now its working.

  1. Deleting the app from the device
  2. Try to install another application
  3. Remove derived data in X-code.
  4. Restart X-Code then clean and build the project then run.

It's still not working then

  1. Remove un-used application
  2. Restart the device and check the Available and capacity in settings
  3. Again app run in device

I hope its worked, enjoy it.

查看更多
你好瞎i
4楼-- · 2020-05-24 19:18

Also this the error shown if your machine running Xcode is low on space.

查看更多
beautiful°
5楼-- · 2020-05-24 19:19

I was having the same error, i just deleted the project and fixed!

Go to Window -> Project and right click, and remove from projects!

查看更多
够拽才男人
6楼-- · 2020-05-24 19:20

Get rid of embedded libraries, dont' just throw it in there make sure it is embedded indeed.

查看更多
冷血范
7楼-- · 2020-05-24 19:20

Apparently this message can also appear if the system clock of device where the app is being installed is too far away from the current time.

I was doing some tests with date formatters by changing my iPhone's system clock and eventually forgot to reset it to the current time. Afterwards it always displayed the same message ("could not write to the device.") whenever I attempted to run the app. Simply resetting the clock in Settings fixed the issue.

查看更多
登录 后发表回答