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:17

I tried various way listed here in the answers, not worked.

Finally I did following and it worked on Xcode 10.1:

Build settings->Product Name-> Changed the product name

The default is $(TARGET_NAME), and rebuild.

查看更多
干净又极端
3楼-- · 2020-08-25 06:21

I also saw this occur when some of the items of source code were not included in the Target Membership for this particular target. It compiles just fine either way, but it won't run unless you check the boxes for Target Membership in the File Inspector. The error given is the same lack of permissions message above.

查看更多
ゆ 、 Hurt°
4楼-- · 2020-08-25 06:25

Deleting Derived data from, Xcode > Preferences > Location and rebuilding the project did the trick for me.

查看更多
登录 后发表回答