每当我尝试在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的权限 重启电脑
有没有其他人遇到过这个问题并找到了解决方案?
当前回答
我的用例有点独特。我使用app_spec的info_plist属性来额外指定信息。plist属性通过哈希。
但是,设置CFBundleExecutable键会导致权限错误。我把它拿掉了。
其他回答
我自己修复了在“arm32”和“arm64”架构之间切换的问题。从“构建设置”中,我将“架构”和“有效架构”从“arm32”修改为“arm64”,它工作了。在改变了一些其他设置后,在arm32和arm64之间切换不再有区别,所以我怀疑这是否是路由原因。
之前我尝试了这里的所有其他建议:
Plist未被修改 EXECUTIBLE_NAME未被修改 构建清洁 删除DerivedData 默认的编译器
我更新了我的可可荚,并在构建设置中添加了新的支持架构,并修复了它。
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.
如果你在项目中使用了。m文件,但没有在构建阶段“编译源代码”中添加,也会出现此消息。
我使用Xcode6 GM。我遇到了同样的问题。我所做的是去构建设置->构建选项。然后我将“Compiler for C/ c++ /Objective-C”的值改为默认编译器。