每当我尝试在Xcode 6 Beta 4中运行我的应用程序时,我都会得到错误:

The file "MyApp.app" couldn't be opened because you don't have permission to view it.

无论我的目标是什么模拟器或设备,都会出现此错误。

我试过:

在Xcode中删除所有来自组织者的派生数据 正在修复驱动器上的权限 手动提升构建的MyApp.app的权限 重启电脑

有没有其他人遇到过这个问题并找到了解决方案?


当前回答

检查项目文件夹的读写权限(在Finder >中右键单击项目文件夹获取信息)

其他回答

我使用Xcode6 GM。我遇到了同样的问题。我所做的是去构建设置->构建选项。然后我将“Compiler for C/ c++ /Objective-C”的值改为默认编译器。

好吧,在我的情况下,我只是重命名捆绑名称和可执行文件的信息值。Plist与项目名称相同。这对我很管用。

1)首先构建选项。

2)然后将“Compiler for C/ c++ /Objective-C”的值改为Default Compiler。

清洁和工作:-)

在设备上也有问题(不仅仅是模拟器)?


其他解决方案只是在模拟器上为我固定,而不是设备。

对我来说,这个问题发生(在Xcode 6),当我试图改变主要信息。Plist属性,同时试图改变我的应用程序名称。

在信息。plist我已经改变了可执行文件名称,而不是默认的${EXECUTABLE_NAME}…

我把这个字段误认为是在跳板图标下更改应用程序名称的字段。

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.