The file “.app” couldn’t be opened becaus

2020-08-25 05:46发布

I get the following warning when I try to run my app:

The file “WxChase.app” couldn’t be opened because you don’t have permission to view it.

I have looked through all the previous questions I could find and can't find an answer.

I have tried:

  • Replacing my info.plist
  • Deleting Derived Data
  • Duplicating my app
  • Editing the permission on the folder of the project
  • Changing "Compiler for C/C++/Objective-C" to Default in Build Settings
  • Checking my architectures
  • Cleaning My Project

Thanks for your help!

Update: I can not run it in simulator or on my phone.

标签: ios xcode
9条回答
姐就是有狂的资本
2楼-- · 2020-08-25 06:02

reinstalling pods worked for me my mistake was : i used update to recommended settings warning and by default xcode update my pods but it doesnt updatet my podfile so just using 'pod install' worked for me

查看更多
Explosion°爆炸
3楼-- · 2020-08-25 06:09

I usually do it by one of the below ways.

查看更多
【Aperson】
4楼-- · 2020-08-25 06:10

I encountered the same problem after I inadvertently removed a folder from the XCode project that contained several required files. Oddly, that folder contained both the LaunchScreen and Main storyboards, as well as the project's custom (and only) AppDelegate... yet I was able to build the project without error, and the only error presented when I clicked "Run" was the "you don't have permission" dialog box, not a runtime error complaining of missing files/references/dependencies.

Moral of the story: In addition to all of the other troubleshooting suggestions above, make sure your project contains all of the folders and files that it depends on.

查看更多
兄弟一词,经得起流年.
5楼-- · 2020-08-25 06:11

Go into your build settings change Compiler for C/C++/Objective-C to Default compiler (Apple LLVM 6.0) instead of Unsupported Compiler(com.apple.compilers.llvmgcc42) for project.

You can refer this question "The file "MyApp.app" couldn't be opened because you don't have permission to view it" when running app in Xcode 6 Beta 4

查看更多
▲ chillily
6楼-- · 2020-08-25 06:14

On XCode 7.3 I got the same issue

Mistake I did

I just Added physical folders and moved my files into them, problem started.

I also tried everything

  • Default compiler
  • Clean and build
  • Reset simulator and reboot simulator, Xcode, iPhone even mac
  • Updated Info.plist
  • Deleting Derived Data
  • Editing the permission on the folder of the project
  • Checking my architectures

nothing worked :(

How I resolved

I just deleted those physical folders, clean build and YESS!! It works!!

查看更多
Deceive 欺骗
7楼-- · 2020-08-25 06:17

select info

Enter Bundle name As : ${PRODUCT_NAME}

Executable file : ${EXECUTABLE_NAME}

查看更多
登录 后发表回答