File "<appName> .app" could not be opened because you do not have permission to view
When you try to start the application, the following warning appears:
The file "WxChase.app" could not be opened because you do not have permission to view it.
I looked through all the previous questions that I could find and cannot find the answer.
I tried:
- Replacing my info.plist
- Delete source data
- Duplicate my application
- Editing permissions in the project folder
- Changing the "Compiler for C / C ++ / Objective-C" by default in the build settings
- Testing my architecture
- Clean up my project
Thank you for your help!
Update: I cannot run it in the simulator or on my phone.
select information
Enter the package name as: ${PRODUCT_NAME}
Executable file: ${EXECUTABLE_NAME}
I also saw this when some elements of the source code were not included in the target membership for this particular purpose. It compiles fine anyway, but it wonβt work unless you select the check boxes for the target membership in File Inspector. The above error is the same lack of permission messages above.
Go to your build settings to compile the compiler for C / C ++ / Objective-C into the default compiler (Apple LLVM 6.0) instead of the Unsupported Compiler (com.apple.compilers.llvmgcc42) for the project.
You can refer to this question "The file" MyApp.app "cannot be opened because you do not have permission to view it" when you run the application in Xcode 6 Beta 4
In Xcode 7.3 I got the same problem
Mistake i made
I just added physical folders and moved files to them, the problem started.
I also tried everything
- Default compiler
- Clean and build
- Reset simulator and reboot simulator, Xcode, iPhone even mac
- Updated Info.plist
- Delete source data
- Editing permissions in the project folder
- Testing my architecture
nothing succeeded: (
As i decided
I just deleted these physical folders , clean build and YESS !! It works!
I encountered the same problem after I accidentally deleted a folder from an Xcode project that contained several required files. Oddly enough, this folder contained both LaunchScreen and the main storyboards, as well as a custom (and only) AppDelegate project ... but I managed to build the project without errors, and the only error when I clicked the Run button was a dialog box "you do not have permission", not a runtime error complaining about the lack of files / links / dependencies.
Moral of the story: In addition to all the other troubleshooting tips above, make sure your project contains all the folders and files on which it depends.
I usually do this in one of the following ways.
- project.pbxproj : Extract a working project.pbxproj file.
- Build Options : Install
Compiler for C/C++/Objective-Con the default compiler. - Executable file : set to
$(EXECUTABLE_NAME)or directly specify the name of your application. - Build> Clean : just do a clean.
- Replace Info.plist with the new file from the new project.
- Duplicate Info.plist in the project : just delete the excess.
- Derived Data. Find the
Xcode->preference->locations->Derived dataXcode->preference->locations->Derived datausingXcode->preference->locations->Derived data, then delete them using therm -r/Users/roofe/Library/Developer/Xcode/DerivedData - And there may be other reasons, you can refer to "The file" MyApp.app "cannot be opened because you do not have permission to view it"
Removing the received data from Xcode> Preferences> Location and rebuilding the project helped me.
reinstalling the modules worked for me, my mistake was this: I used a warning about updating to the recommended settings, and by default xcode updates my modules, but it does not update my subfile, so using the "install pod" worked for me
I tried various methods listed here in the answers did not work.
Finally, I did the following, and it worked on Xcode 10.1 :
Assembly settings-> Product Name-> Product Name Changed
The default is $ (TARGET_NAME), and rebuild.