每当我尝试在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的权限 重启电脑
有没有其他人遇到过这个问题并找到了解决方案?
当前回答
对我来说,触发这个错误的原因是,在我的资源文件夹的根目录下,有一个与我的最终可执行文件同名的文件夹。
所以,当启动可执行文件时,我认为Xcode发现了文件夹,并在执行文件夹时遇到了问题!: -)
其他回答
对我来说,错误是在文件信息。plist, field Bundle标识符。不知怎的,它被修改成了
com.myCompany。$ {PRODUCT_NAME: rfc1034identifier}
从
com.myCompany。$ {PRODUCT_NAME}
我在4年前从gitHub下载的Xcode 6.1.1项目上也犯了同样的错误。 对我来说,在“构建设置”中将“架构”设置为默认值“标准架构”(armv7,arm64),并将C/ c++ /Objective-C的“编译器”设置为“默认编译器”。
我也有类似的问题。显然我已经包含了信息。Plist从外部项目文件夹。这将导致相同的错误,在每次构建之后都会显示出来(除了我在清理项目后运行它之后)。
为了解决这个问题,我只需要包含信息。从项目文件夹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.
请检查是否已将可执行文件=> $(EXECUTABLE_NAME)更改为任何其他名称。如果您更改了此名称,则会显示此错误。请用$(EXECUTABLE_NAME)替换它。