284

Whenever I try to run my app in Xcode 6 Beta 4 I am getting the error:

The file "MyApp.app" couldn't be opened because you don't have permission to view it.

This error appears no matter what simulator or device I target.

I have tried:

  • Deleting all Derived Data from Organizer in Xcode
  • Repairing permissions on my drive
  • Manually elevating the permissions of the built MyApp.app
  • Restarting my computer

Has anyone else run into this problem and found a solution?

Screenshot

Jayprakash Dubey
  • 32,447
  • 16
  • 161
  • 169
drewag
  • 88,073
  • 28
  • 133
  • 127
  • 2
    I am getting the same problem with XCode 6.1. At first, the issue was just with the simulator, now, after following some leads in this post, I have the same error running my target phone as well. – Bamaco Nov 26 '14 at 19:41
  • 1
    I followed @YuAn solution. It works very well for the simulator. Thanks But when I try to build it on the device, I am still getting the message saying 'I don't have any permission to view it'. The myapp.app file in products directory in xcode and also in derived data directory is showing blocked even after trying to build after deleting the contents of the derived data. – Srinivasan N Jan 08 '15 at 07:02
  • 4
    Another (stupid) way to trigger this problem: Compile an app with only resources, and no source files. Don't ask me how I know that :) – Krumelur Jun 12 '15 at 15:21
  • 4
    Product > Clean solve this for me – mazorati Sep 30 '16 at 21:21
  • In my case none of these did not work!! Once I delete pilst file from Xcode and again attach with project, it works like a charm!! Hope help you Guys!! – Ravi Jul 25 '17 at 18:34
  • I have different solution for it. Please check my answer here https://stackoverflow.com/a/46546044/5013722 – mrunal thanki Oct 03 '17 at 13:45
  • @Krumelur I just spent hours on that before I stumbled upon your comment. The project in question doesn't *need* any of its own source code -- it's a standalone game app built from the game engine "framework" and a game data file. The game engine framework is built as a dependency via Xcode, but the app isn't executable unless it has some (redundant/useless) source code of its own. THANK YOU. – monkey0506 Jun 07 '18 at 10:41
  • I am also facing same issue in the when running app in Xcode 10.1 if any one have better solution please share – Mohd Iftekhar Qurashi Jun 11 '19 at 13:46
  • When cleaning failed to resolve it and my Info.plist settings were already as mentioned in the solutions below, restarting my machine worked like a charm. Good old turn it off and on again :) – Jason Jan 16 '20 at 01:48
  • What worked for me is here: https://stackoverflow.com/questions/24924809/the-file-myapp-app-couldnt-be-opened-because-you-dont-have-permission-to-vi/64016147#64016147 – Narendar Singh Saini Sep 22 '20 at 19:04

58 Answers58

253

I use Xcode6 GM. I encountered the same problem. What I did was to go to Build Settings -> Build Options. Then I changed the value of the "Compiler for C/C++/Objective-C" to Default Compiler.enter image description here

Umar Farooq
  • 715
  • 1
  • 9
  • 18
149

Having the problem on DEVICE too (not just simulator)?


The other solutions only fixed it for me on simulator, not device.

For me this problem occurred (in Xcode 6) when I would try to change the main info.plist properties whilst trying to change my app name.

In info.plist I had changed Executable File name to something other than the default ${EXECUTABLE_NAME}...

I had mistaken this field for the field that changes the name of the app under the icon on the springboard.

Albert Renshaw
  • 15,644
  • 17
  • 92
  • 173
  • 10
    In my case, this worked thank you. I'd been changing other similar fields in my -Info.plist file, and once I'd changed Executable File back to ${EXECUTABLE_NAME} as you suggested, it built and ran. – Slowburner Nov 06 '14 at 03:50
  • Thanks..Same was my case – Bala Vishnu Nov 29 '14 at 15:42
  • Thanks a lots @Albert Renshaw, youe answer resolved my issue. I am searching solution for that since last two days. – Nilesh Kikani Jan 08 '15 at 12:24
  • Same problem, name of field is "Bundle display name" for changing name under the icon – WebOrCode Mar 26 '15 at 14:40
  • @Albert : I have default $(EXECUTABLE_NAME) name in Executable file but still getting the same build error.. – Jayprakash Dubey Mar 27 '15 at 13:00
  • This was the answer for me when using SpriteBuilder (Cocos2d-Swift) – Paul Mar 29 '15 at 22:40
  • Same. I had product name set to fixed value. When I changed the target name, the error showed up. – Joris Weimar May 07 '15 at 08:39
  • I tried localizing the Info.plist but then it gave me a build error because it couldn't find the file anymore. I reverted my changes, and then I was getting this "permission" error thing. Since everything was obviously as it was before, the problem wasn't in the Info.plist itself. I cleaned the Build folder as yury.ku suggested and that worked for me. – endavid Jul 12 '15 at 16:08
  • This also fixed it for me. With a "different" application name, the program built, ran, and would even Archive (ready to become an in-house app). But when I attempted to make that in-house app *with* a manifest file, I'd get an error of "Missing required bundle identifier property in distribution manifest" error. Xcode. Each year giving us another reason to hate it just a little bit more. – Mike Gledhill May 12 '16 at 14:10
  • Yes. This helped me too. – SLi Feb 08 '18 at 19:03
  • 1
    This lead me to my solution, which was I had gotten an extra Info.plist when I included the source for an external library into my code, and they had an Info.plist inside their assets group folder. Removing that extra Info.plist fixed my problem. – chadbag Jul 21 '18 at 02:46
145

In Xcode do the following

Window --> Organiser --> Projects --> The app with the issue --> delete button in Derived Data.

I then cleaned the project and voila

works

Tom
  • 2,248
  • 1
  • 13
  • 28
  • I followed @YuAn solution. It works very well for the simulator but when I try to build it on the device, I am still getting the message saying 'I don't have any permission to view it'. The myapp.app file in products directory in xcode and also in derived data directory is showing blocked even after trying to build after deleting the contents of the derived data. Any Idea what went wrong? – Srinivasan N Jan 08 '15 at 07:04
  • this worked for me BUT it keeps happening. I can't continually delete derived data every time I want to run the app in the simulator... – zumzum Mar 12 '15 at 14:36
  • I am facing same issue tried various solution but didn't worked for me.. Help will be appreciated – Giriraj.Mulay Jun 17 '20 at 12:10
53

For me, a simple Product -> Clean worked great

SleepsOnNewspapers
  • 3,026
  • 3
  • 20
  • 27
45

I've fixed it by cleaning a build folder. Just went to 'Product' menu and Option+Click 'Clean'. After that a problem was resolved.

yury.ku
  • 1,148
  • 10
  • 18
30

There was a problem with the Info.plist of the project. I created a new project with the same name in Xcode 6 beta 4 and then replaced the real project's Info.plist with the new one. The project then built and ran fine.

Look at the diff, it appears like the plist might have somehow gotten mixed up with a playground's plist. The bundle identifier was "com.apple.dt.playground.iOS-18300-13" and the executable and bundle names were "iOS" along with some other oddities.

This is the full diff in case anyone needs it for reference:

        <key>CFBundleDevelopmentRegion</key>
        <string>en</string>
        <key>CFBundleExecutable</key>
-       <string>iOS</string>
+       <string>${EXECUTABLE_NAME}</string>
        <key>CFBundleIdentifier</key>
-       <string>com.apple.dt.playground.iOS-18300-13</string>
+       <string>com.myCompany.${PRODUCT_NAME:rfc1034identifier}</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
-       <string>iOS</string>
+       <string>${PRODUCT_NAME}</string>
        <key>CFBundlePackageType</key>
-       <string>AAPL</string>
+       <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0</string>
-       <key>CFBundleSupportedPlatforms</key>
-       <array>
-               <string>iPhoneSimulator</string>
-       </array>
+       <key>CFBundleSignature</key>
+       <string>????</string>
        <key>CFBundleVersion</key>
        <string>1</string>
-       <key>DTPlatformName</key>
-       <string>iphonesimulator</string>
-       <key>DTSDKName</key>
-       <string>iphonesimulator8.0</string>
-       <key>LSBackgroundOnly</key>
-       <true/>
        <key>LSRequiresIPhoneOS</key>
        <true/>
+       <key>UIMainStoryboardFile</key>
+       <string>Main</string>
        <key>UIRequiredDeviceCapabilities</key>
        <array>
                <string>armv7</string>
        </array>
+       <key>UISupportedInterfaceOrientations</key>
+       <array>
+               <string>UIInterfaceOrientationPortrait</string>
+               <string>UIInterfaceOrientationLandscapeLeft</string>
+               <string>UIInterfaceOrientationLandscapeRight</string>
+       </array>
 </dict>
 </plist>
drewag
  • 88,073
  • 28
  • 133
  • 127
28

I've had same this error in Xcode 8.2. The reason I found out for me, another Info.plist is added in my project while adding library (manually copy).

So that Xcode is getting confused for selecting correct Info.plist.

I just removed that Info.plist from the added library.

Then it is working fine without any permission alert.

Antony Raphel
  • 1,700
  • 2
  • 20
  • 44
16

Please check if you have changed Executable file => $(EXECUTABLE_NAME) to any other name. If you have changed this name then it shows this error. Please replace it with $(EXECUTABLE_NAME).

Pratik Patel
  • 1,330
  • 12
  • 18
  • Yeah happened to me when trying to change app name. Season developer so just went into plist absentmindedly and changed "Executable File" when in reality I mean to change "Bundle Name" – MobileMon Oct 01 '15 at 18:37
  • This fixed it for me. It happened after I renamed my project. Thanks. – emiliomarin Oct 21 '17 at 15:08
14

Product -> Clean (command shift K) fixed it for me

  • Good reminder that sometimes the simple solution is the one that works. – Pescolly Feb 01 '15 at 23:02
  • A clean and Xcode restart was required here under Xcode 7.2.1. Cleaning alone progressed me to an "unknown error" with no attempt to build. – Tommy Feb 23 '16 at 17:31
13

My goodness!! I spent hours to resolve this issue.

On XCode 7.3 I was having project with no issues.

Mistake I did

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

I 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 was about create new project and then I just deleted those physical folders I added, clean build and YESS!!

It works!!

enter image description here

swiftBoy
  • 33,793
  • 26
  • 129
  • 124
13

Try "cmd+shift+k" to clean the project and rebuild. At least it worked for me

One Eyed Raven
  • 1,151
  • 10
  • 23
11

Sometimes opening old project in new version Xcode will get this message.

Go to Issue navigator and follow the warning hint 'Upate to reconmmented settings'.

Boom, magic!

ManuQiao
  • 650
  • 7
  • 19
11

I had similar issue (xCode 6.2) for sample code downloaded. I tried to set Executable Name to Default in Info.plist but this didn't worked.

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

Screenshot

Jayprakash Dubey
  • 32,447
  • 16
  • 161
  • 169
11

My Application was working fine on XCode 9.4, but when I opened my project in XCode 10 I was experiencing this issue. For me the issue was the build setting. I found the answer in this page https://forums.developer.apple.com/thread/112141.

In short go to File > Workspace Settings… > Build System and change it to "Legacy Build System"

informatiker
  • 2,429
  • 4
  • 15
  • 13
10

1) Go Firstly Build Options.

2) Then changed the value of the "Compiler for C/C++/Objective-C" to Default Compiler.

clean and working :-)

Waseem Shah
  • 2,199
  • 21
  • 23
  • 1
    To clear it up: 1. Go to Build Settings (Choose _All_ and _Combined_) 2. Search for _Build Options_ 3. Set the _Compiler for C/C++/Objective-C_ to _Default Compiler_ – nburk Nov 26 '14 at 18:51
  • Why are people up voting this copying of the highest rated answer? – kiranpradeep Mar 30 '15 at 14:37
10

I found that changing my compiler to LLVM 6.0 in the Build Options was enough for me (xcode 6.1)

enter image description here

SleepsOnNewspapers
  • 3,026
  • 3
  • 20
  • 27
10

I got same error on my Xcode 6.1.1 for a project downloaded from gitHub which was committed 4 years ago. For me, setting Architectures to the default value Standard architectures(armv7,arm64) and Compiler for C/C++/Objective-C to Default Compiler in Building Settings worked.

zeeawan
  • 5,809
  • 2
  • 46
  • 53
10

I had the same issue in my project. Later on found that third-party (fmdb for SQLite) file used in project contained Info.plist.

Simply deleting the Info.plist file worked for me!

Info.plist

Jayprakash Dubey
  • 32,447
  • 16
  • 161
  • 169
9

I recently meet the same problem for running an old project (initially created in Xcode 4.x) in Xcode 6.0.1.

I fixed the problem by changing the Architectures in Building Settings to the default value, which is "Standard architectures(armv7,arm64)".

Hope this could help anyone who got similar problems :)

HunTer DRF
  • 181
  • 1
  • 13
9

I've had this error with a number of my older projects that I am getting out of the cupboard to update. It seems that using Xcode 6 with older code seems to bring this about for some reason.

I have fixed this in all projects that I have done this with by:

  1. Delete Derived Data
  2. in Product: do a clean
  3. go to Build Settings in the project Target and go to Build Options and change the value of the "Compiler for C/C++/Objective-C" to 'Default Compiler'.
idmean
  • 13,418
  • 7
  • 47
  • 78
8

Well in my case, I just rename the Bundle Name and Executable file values in info.plist same as project name. It worked for me.

Ans
  • 3,101
  • 3
  • 20
  • 24
8

I tried all of the listed answers and none of them was useful. The problem was due to existence of an another plist file linked from a submodule via cocoapods. Luckily this was my own module, so I just deleted this plist from the submodule project and reinstalled pods.

solution

Later on I understood that the key of the problem was in the name of that second plist: simply info.plist. You may rename the file and relink it via a sources section of a submodule

That second plist file had a unique name, so Xcode was not supposed to become frustrated. Even my target settings pointed on a main plist, not on a info.plist. Looks like Xcode takes special consideraions about that name

The bug reproduced in Xcode 6.4 and Xcode 7.0

Tim
  • 1,707
  • 17
  • 24
  • A similar thing happened to me. My Info.plist was not configured correctly, so XCode took the first `Info.plist` it happened to find in the project's folder, which belonged to some unrelated dependency. – Ohad Schneider Dec 09 '15 at 17:29
  • thank god, you just saved me hours of pointless Xcode debuggin' – Alex Apr 18 '16 at 06:02
7

What I did is here:

  • I deleted VALIDARCHS from Project
  • I deleted VALIDARCHS from Target
  • Build Active Architecture Only = YES (for Debug) Architectures
  • Standard Architectures $(ARCHS_STANDARD)

Also, File -> Project/Workspace Settings == New Build System

Xcode Version 12.0 (12A7209)

Narendar Singh Saini
  • 3,375
  • 1
  • 13
  • 17
6

I had this similar problem. Somehow my value for the key Executable File got mixed up. Just change it back to ${EXECUTABLE_NAME} (Under your project > Info). Worked for me!

Viper
  • 1,119
  • 1
  • 9
  • 29
  • 1
    One thing to note, is that mine was set to $(EXECUTABLE_NAME) and updating it to ${EXECUTABLE_NAME} fixed the problem for me. – Eric Dec 24 '14 at 07:20
5

Don't know if the problem is related but maybe it can be a solution for anyone pulling the hairs like me.

In my case, I have a project with a lot of targets. Each target is a customisation of that base project which is a Cocoa Touch Static Library and the targets, Applications. Even if the main file is added into the library compilation, but not in each target, that error message appears. So what I did? Manually added the main file to each target in the Compile Sources section and bingo, all fine.

Gustavo Barbosa
  • 1,320
  • 1
  • 17
  • 27
5

In my case main.m containing the main(...) function was not contained in the list of "Compile Sources" in "Build Phases". To check if this is the case, enter into Build Phases and look, if your main.m appears in the "Compile Sources" list.

Awsed
  • 8,574
  • 5
  • 22
  • 25
  • 1
    I don't know how you discovered this, and it wasn't my exact problem but it lead me to the solution so THANKS!! – Ri_ Nov 18 '15 at 12:00
  • I also had this, (missing a main()) but with .cpp, for any readers that may believe the .m or .mm is significant. – Soylent Graham Sep 12 '20 at 14:55
5

For me the error was in the .plist file at the key CFBundleExecutable. I had renamed the executable removing a space that was between two words. (Eg: from "Wild Racer" to "WildRacer"). Took 1 day to spot it!!

Xcode is soooo unhelpful in the debugging!

jeddi
  • 561
  • 1
  • 8
  • 20
3

What solved it for me was setting Build Active Architecture Only from No to Yes.

Misha
  • 684
  • 5
  • 14
3

with X-code 6.3.2

[Build Settings] Options. [All]-[Build Options]-[Compiler for C/C++/Objective-C]-[Default compiler (Apple LLVM 6.1)]

Then rebuild the project, and it runs ok.

bruce
  • 930
  • 8
  • 14
2

In my case it helped just to close Xcode, repaired the permissions with the Disk Utility. Only after a reboot it worked like a charm.

idmean
  • 13,418
  • 7
  • 47
  • 78
Markus Zeller
  • 5,223
  • 2
  • 27
  • 29
2

As i have also faced this issue today morning and none of the answers helped me out particularly in my case. And after trying for hours i figured out the issue.

Actually while working in storyboard by mistake, i just renamed my "Main.storyboard" to ".storyboard" and changing it back to "Main.storyboard" solved my issue.

SOLUTION(As per my issue): May be you have renamed any file due to which xcode couldn't load it and raised an issue. For example: as mentioned above the case of changing "Executable File" name
Possible Issue area: May be the last few files you were working in.

rahulchona
  • 582
  • 4
  • 10
2

I had similar issues. Apparently I've included Info.plist from outside project folder. That lead to the same error, shown after every build (except after I run it after cleaning the project).

To fix it I simply had to include Info.plist from the project folder.

Radek
  • 511
  • 3
  • 12
2

The error message is generic and doesn't actually tell you what it really mean.

For me I had to restore earlier github reversions which gave:

armv7 armv7s arm64

to the architecture.

SmallChess
  • 7,103
  • 9
  • 49
  • 79
2

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.

Daniel Mavrakis
  • 514
  • 6
  • 14
  • it's worked for me. I finally fixed by deleting the Exclude_Archs. 3q very much! It's what you says, not a permission issue. – AZZ Nov 09 '20 at 09:54
2

If you google the text of this error message you will find maybe 20 threads across StackOverflow, Apple dev forums, Reddit, etc. about Xcode failing to be able to run a compiled executable with this error message.

In these threads you will find many people offering various suggestions about how to fix the problem: changing product name to match project name, changing build phase options, something with info.plist, changing compilers to or from Clang, etc. Presumably the suggestions are offered in good faith because they solved the problem for someone, but the answers are so varied that it is clear that the error message is generic and this is an important point if you are receiving it: this error seems to mean that something is wrong with the binary. Ignore its actual text: it may have nothing to do with permissions.

There is no general solution to this error. The error message is totally generic; assume it means "bad binary file". The solution if you are receiving it depends on what you are trying to do, what has changed, why you are seeing this error all of a sudden. Google the specifics of your situation rather than this error message.

In my case, and I have a feeling this is a common case, what I was trying to do was build an old iOS project, nine years old I think, on modern Xcode. The solution was to switch to the legacy build system which led to a compilation error because in the old project there were not modern architecture targets, which could be fixed by manually adding them.

jwezorek
  • 3,125
  • 1
  • 19
  • 30
1

I'm using Xcode 6 GM. I encountered the same issue. What I did was to go to Build Settings -> Build Options (you can search "compiler"), and then changed the option of the "Compiler for C/C++/Objective-C" to Default Compiler.

Harry Zhang
  • 589
  • 6
  • 5
1

I fixed this myself switching between "arm32" and "arm64" architectures. From the "Build Settings", I modified "Architectures" and "Valid Architectures" from "arm32" to "arm64" and it worked. After changing a number of other settings, switching between arm32 and arm64 no longer makes a difference, so I'm skeptical if this was the route cause.

Previously I tried all the other suggestions here:

  • plist was unmodified
  • EXECUTIBLE_NAME was unmodified
  • Build Clean
  • Delete DerivedData
  • Default Compiler
brunobowden
  • 1,432
  • 17
  • 37
1

I changed name to new name then I returned the old name to my project and it helped me.

Alexander Khitev
  • 5,168
  • 13
  • 45
  • 96
0

I would go to the folder where your Xcode docs are and hit command + I to get info. At the bottom, hit the lock to unlock the folder to edit permission. If permissions look good, check the box that says to apply to enclosed folders and let that do it's thing. I haven't seen this personally and not sure if that's what you were saying in your post when you edit the build permissions.

fingaz
  • 241
  • 1
  • 6
  • I tried the extreme of giving "everyone" Read & Write permissions but still no luck – drewag Jul 24 '14 at 04:05
  • So the other thing that I can think of to try is to reset ACLs and Home Folders which I believe is commonly found on the recovery partition by enter resetpassword in the terminal app. But to further troubleshoot you could drag that folder to the shared folder at /Users/ and create a new admin to see if it is user specific. – fingaz Jul 24 '14 at 04:10
  • 1
    thanks for the help! I actually discovered the problem (the info.plist of the project was corrupted) – drewag Jul 24 '14 at 04:29
0

For me error was in file info.plist, field Bundle identifier. Somehow it was modified to

com.myCompany.${PRODUCT_NAME:rfc1034identifier}

from

com.myCompany.${PRODUCT_NAME}

Lucas Zamboulis
  • 2,486
  • 5
  • 22
  • 26
Anton Plebanovich
  • 978
  • 14
  • 12
0

I was able to restore my project from a pre-xcode 6.1 backup,

Once I open my workspace from a different directory, I was able to run my target without this error. The simulator also works fine now.

Bamaco
  • 522
  • 6
  • 23
0

My solution was:

  1. Enter this in your Terminal: open ~/Library/Developer/CoreSimulator/Devices/

  2. Delete the appropriate folder

  3. Compile again an it should work

CGN
  • 559
  • 4
  • 12
0

Check permissions to read+write for project folder (Right Click for project folder in Finder > Get Info)

Di B.
  • 999
  • 10
  • 11
0

I had this issue when my appdelegate class was not linked against my main app target but a separate static framework. Linking it directly against the target app fixed the issue.

StackRunner
  • 1,414
  • 1
  • 16
  • 22
0

On my part, what trigger this error was that I had, at the root of my resources folder, a folder with the same name as my final executable file.

So, when launching the executable, I think Xcode found the folder and had problem executing a folder! ;-)

Nicolas Buquet
  • 3,492
  • 23
  • 26
0

Select Scheme Menu by pressing needed button on the right of run/stop buttons:

Picture 1


Press Edit Scheme... :

Picture 2


Select your executable:

Picture 3

Borzh
  • 4,450
  • 2
  • 41
  • 58
0

Please also check if you have added any third party lib with plist. Some time third party lib has the info plist causing the issue .

Shreesh Garg
  • 551
  • 5
  • 18
0

I fixed this by clearing my derived data from the preferences in xcode

0

I came to this issue both on simulator and device.

And there is a tricky phenomenon. If I copy the project to a new place, there is some chance this issue gone when I first run. But after I clean and run, this issue comes.

I have try almost all the solution from the answers to this question, but neither do.

With the help of the version control system git, I can check out the previous version of the code and to see what modification lead to this issue.

In my project the HEAD version is workable, and my latest umcommitted modification will lead to this issue.

So I checkout each file from the workable version of my code to locate the issue. When I checkout the coin.xcodeproj/project.pbxproj(coin is my app name), this issue gone.

Solution: just checkout the workable coin.xcodeproj/project.pbxproj, for my case I just use the HEAD version is ok.

git checkout HEAD coin.xcodeproj/project.pbxproj


To make it a summary:

LF00
  • 22,077
  • 20
  • 117
  • 225
0

I had the same issue with Xcode 10 & react-native. All the above solutions didn't help me.

My solution: Create a new project with the same name. And change project & workspace files with the ones from the duplicated project. And it works!!! (after some small build-issues with path etc)

evgenii
  • 183
  • 5
0

I updated my cocoa pods and added new supported architectures in build settings and that fixed it.

Scott Loomis
  • 59
  • 1
  • 6
0

I got this issue in Xcode 10.1 after adding objective c files to my swift project. Got this working by following the below steps,

  • Add .m file to compile sources under Target -> Build Phases
  • Add -objc to the compiler flags right next to the .m file
yaali
  • 1,533
  • 1
  • 13
  • 40
0

This message will also appear if you use .m files in your project which are not added in the build phase "compiles source"

Secondwave
  • 186
  • 2
  • 14
0

None of the solutions worked for me in Xcode 10.3 when I added two objective-c files to my project. I fixed by following the below steps,

  1. Go to Build Phases
  2. Check if the .m file is present inside Compiler sources. If not add it
  3. Add -objc flag for compiler flags right next to the .m file
yaali
  • 1,533
  • 1
  • 13
  • 40
0

Maybe consider installing the latest version of Xcode.

I did that after trying all the other solutions (which did not work for me) and the issue was automagically fixed.

Chen Ni
  • 491
  • 1
  • 5
  • 9
-1

What we didn't do right was to not apply with the accurate code when signing in the Build Settings. We fixed the issue up this way: Enter into Build Settings >> Code Signing >> Code Sign Identity. Then, apply with your iOS Developer ID for 'Debug', but be sure to apply with your iOS Distribution Profile for 'Release' We didn't apply correctly, so we couldn't have permission to ask for the App from the server, actually. Anyway this post forced us to revise all the parameters and requirements, so we pretty appreciate all your answers. Regards, T.

-1

That's because you may using the repository cloned from the git or svn. Try to clone another new version and run it.

zinc
  • 111
  • 2
  • 8
-1

I had the issue that the AppDelegate was missing.

Creating a minimal one solved the issue:

import UIKit

@UIApplicationMain
final class AppDelegate: UIResponder,UIApplicationDelegate {
}
Etan
  • 15,505
  • 17
  • 83
  • 142