每当我尝试在Xcode 6 Beta 4中运行我的应用程序时,我都会得到错误:
The file "MyApp.app" couldn't be opened because you don't have permission to view it.
无论我的目标是什么模拟器或设备,都会出现此错误。
我试过:
在Xcode中删除所有来自组织者的派生数据 正在修复驱动器上的权限 手动提升构建的MyApp.app的权限 重启电脑
有没有其他人遇到过这个问题并找到了解决方案?
每当我尝试在Xcode 6 Beta 4中运行我的应用程序时,我都会得到错误:
The file "MyApp.app" couldn't be opened because you don't have permission to view it.
无论我的目标是什么模拟器或设备,都会出现此错误。
我试过:
在Xcode中删除所有来自组织者的派生数据 正在修复驱动器上的权限 手动提升构建的MyApp.app的权限 重启电脑
有没有其他人遇到过这个问题并找到了解决方案?
当前回答
好吧,在我的情况下,我只是重命名捆绑名称和可执行文件的信息值。Plist与项目名称相同。这对我很管用。
其他回答
None of the provided answers worked for me. In my case, I finally fixed the error by updating the target architectures in Build Settings/Architectures/Valid Architectures to $(ARCHS_STANDARD), as arm64 was missing. This was not prohibiting the project to build, although a warning was issued recommending updating the valid architectures, but the "app could not be opened" error was shown at run time. I surmise this error is rather generic and not always linked with a permission issue, but may be displayed when the generated app package is invalid.
如果你谷歌这个错误消息的文本,你会在StackOverflow,苹果开发论坛,Reddit等地方发现大约20个关于Xcode无法运行编译后的可执行文件的错误消息。
In these threads you will find many people offering various suggestions about how to fix the problem: changing product name to match project name, changing build phase options, something with info.plist, changing compilers to or from Clang, etc. Presumably the suggestions are offered in good faith because they solved the problem for someone, but the answers are so varied that it is clear that the error message is generic and this is an important point if you are receiving it: this error seems to mean that something is wrong with the binary. Ignore its actual text: it may have nothing to do with permissions.
对于这个错误没有通用的解决方案。错误消息是完全通用的;假设它意味着“坏二进制文件”。如果你收到它,解决方案取决于你正在尝试做什么,改变了什么,为什么你突然看到这个错误。谷歌您的具体情况,而不是这个错误消息。
在我的例子中,我感觉这是一个常见的例子,我试图做的是在现代Xcode上构建一个旧的iOS项目,我想有9年了。解决方案是切换到遗留构建系统,这导致了编译错误,因为在旧项目中没有现代架构目标,可以通过手动添加它们来修复。
我的项目也遇到了同样的问题。后来发现项目中使用的第三方(fmdb for SQLite)文件包含Info.plist。
简单地删除信息。Plist文件为我工作!
我更新了我的可可荚,并在构建设置中添加了新的支持架构,并修复了它。
错误消息是通用的,实际上并没有告诉您它的真正含义。
对我来说,我必须恢复早期的github回归,这给:
armv7 armv7s arm64
对建筑。