ios 应用安装失败:无法写入设备

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31002642/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 06:34:22  来源:igfitidea点击:

App installation failed: Could not write to the device

iosiphonexcode6

提问by Kh_Shata

In Xcode 6.3, I got this error when trying to run an iOS project written in Swift on a real device.

在 Xcode 6.3 中,我尝试在真实设备上运行用 Swift 编写的 iOS 项目时遇到此错误。

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?

我该如何解决这个错误?

回答by PaulYin

Deleting the app on the device and running the project again works for me.

删除设备上的应用程序并再次运行该项目对我有用。

回答by wj2061

I did a Clean and installed my app successfully.

我做了一个 Clean 并成功安装了我的应用程序。

Product->Clean(Shift-Cmd-K)

产品->清洁(Shift-Cmd-K)

回答by Vidya

I turned off the device and turned it on again after which I did not get such error.

我关闭了设备并再次打开它,之后我没有收到这样的错误。

回答by Gutty1

OK, few things you should consider that could guide us to the problem, please check and post the answers:

好的,您应该考虑的几件事可以指导我们解决问题,请检查并发布答案:

  1. is your project using capabilities? are they set correctly (should be all green)
  2. did you try with a different project (something really simple)?
  3. are you able to install apps from the App Store?
  4. did you check the amount of free space left in the device?
  1. 您的项目是否使用了功能?它们设置正确吗(应该都是绿色的)
  2. 您是否尝试过其他项目(非常简单的事情)?
  3. 您可以从 App Store 安装应用程序吗?
  4. 您是否检查了设备中剩余的可用空间量?

if not, another suggestion will be using exception breakpoint, there is someone that posted an explanation how to setup it, do it and post the logs

如果没有,另一个建议将使用异常断点,有人发布了如何设置它的解释,并发布日志

App installation failed

应用安装失败

I hope it helps you

我希望它能帮助你

回答by Andrew Ho

Got this problem twice in one week on complete different devices.

一周内在完全不同的设备上两次遇到此问题。

One device had no more storage left, after deleting some apps the project installed perfectly.

一台设备没有更多的存储空间,在删除一些应用程序后,该项目完美安装。

The other device was fixed after rebooting the device

重新启动设备后,其他设备已修复

回答by xavi.pedrals

If you are using a free developer accountyou may need to uninstall some other apps you have signed.

如果您使用的是免费的开发者帐户,您可能需要卸载一些您已签名的其他应用程序。

回答by Alexander Vitanov

For me it was the provisioning profile - I used distribution instead of development

对我来说,这是配置文件 - 我使用分发而不是开发

回答by Thomas Elliot

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

在此处输入图片说明

回答by leandrodemarco

For me the following did not work on iOS 11 beta 10, XCode 9 beta 6:

对我来说,以下在 iOS 11 beta 10、XCode 9 beta 6 上不起作用:

  • Restart the device
  • Deleting the app from the device
  • No symlinks were in the project
  • There was plenty of storage available
  • 重启设备
  • 从设备中删除应用程序
  • 项目中没有符号链接
  • 有足够的存储空间

Deleted Derived Data and voilá, it worked again

删除派生数据,瞧,它又工作了

回答by Luiz Henrique Guimaraes

in my project this problem happened because there was a folder with symbolic link. I removed that folder and it worked properly.

在我的项目中,发生此问题是因为有一个带有符号链接的文件夹。我删除了那个文件夹,它工作正常。