每当我尝试在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, field Bundle标识符。不知怎的,它被修改成了

com.myCompany。$ {PRODUCT_NAME: rfc1034identifier}

com.myCompany。$ {PRODUCT_NAME}

其他回答

当我在Xcode 10.3中添加两个objective-c文件时,没有一个解决方案适合我。我通过以下步骤固定,

进入构建阶段 检查.m文件是否存在于编译器源代码中。如果不加的话 在.m文件旁边添加编译器标志的-objc标志

What we didn't do right was to not apply with the accurate code when signing in the Build Settings. We fixed the issue up this way: Enter into Build Settings >> Code Signing >> Code Sign Identity. Then, apply with your iOS Developer ID for 'Debug', but be sure to apply with your iOS Distribution Profile for 'Release' We didn't apply correctly, so we couldn't have permission to ask for the App from the server, actually. Anyway this post forced us to revise all the parameters and requirements, so we pretty appreciate all your answers. Regards, T.

我在4年前从gitHub下载的Xcode 6.1.1项目上也犯了同样的错误。 对我来说,在“构建设置”中将“架构”设置为默认值“标准架构”(armv7,arm64),并将C/ c++ /Objective-C的“编译器”设置为“默认编译器”。

我发现在Build Options中将我的编译器更改为LLVM 6.0对我来说就足够了(xcode 6.1)

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