iOS Simulator - Launch Services Error 0 - xcode

I am trying to overcome an issue. I am having to reset my simulator setting every time before a generate a build otherwise I get the following error.
Any idea about how to overcome this issue?
Can anyone relate that to adding PubNub with pods to the project?

"Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved this issue for me.

Resetting didn't quite fix it for me I had to do a full clean build for it to start running on the emulator again. Just hold down on the option key and from the Product menu select Clean build folder.

Check CFBundleShortVersionString, CFBundleVersion in InfoPlist.plist and InfoPlist.strings localization file, values should be the the same in both files.

Related

Interface builder storyboard compiler error Xcode

I downloaded Xcode and am getting "Interface builder Storyboard Compiler Error" when I try and run any project.
So far to troubleshoot this I have(based off any similar threads):
-cleaned the file
-created a new blank file (which still gives the compiler error message)
-uninstalled and reinstalled Xcode (Version 8.2.1)
-tried installing Xcode 8.3 beta 5 (still gives me the same error)
so far nothing has fixed this error.
Also I'm up to date on OS, running macOS Sierra version 10.12.3
I am learning swift for work and am hoping to get this figured out soon.
Thank you!
Xcode 8.2.1:
quit Xcode
delete .xcuserdatad folder inside xcuserdata of .xcworkspace(if using Cocoapods) or .xcodeproj
reopen Xcode, clean project and clean build folder (Under Product option)
That should be ok!
I had the same problem while trying to archive my app for the app store. I tried twice and same problem occurs.
Then i deleted the derived data, cleaned the project and restarted Xcode - THAT FIXED it.
Hopefully this will help someone else
I Solved the problem by cleaning the build folder.
Just use cmd + option + shift + k and then build the project by using cmd + B and hopefully solve the problem.
I was having this error for xCode 9.
An .xib file was creating the error.
What I did was,
removed .xib file
added it back to the project
cleaned and built the project
That solved my problem.
I also ran into this with XCode 9 Beta - 2, the quick nuke from orbit didn't fix it. Just check out the Log file it points you to and you can at least patch the offending issue, even if it a bug on Apple's end. For me, the TabBar didn't like an icon image, removed it for now and it Built fine.
I'll try replacing it yet with another image. Apparently it doesn't like its own System-provided Images.
Exception name: NSInvalidArgumentException
Exception reason: System-provided UIImage instances cannot be encoded
in NIBs - raised for instance '<UIImage: 0x7fd377eb4510>, {18, 20}'
None of the above suggestions worked for me. After further research I found that I had dragged a segue (popover) from a button inside of a tableview cell.
This is not allowed, as the touch anchor screen location is dynamic while the table scrolls.
I fixed the problem by anchoring the whole tableview instead and programmatically altering the popover arrow placement to be in line with the cell's button.
I just had the same problem.
After systematically removing objects from the xib I found that a button which was disabled and hidden created the internal error. After removing the button it works. (I tried to set the button back to normal : visible and enabled but that was not sifficient).
Hope that help you.
I have filed a bug report.
I have solved this issue by following below steps:
1. cmd + shift + k
2. cmd + option + shift + k
3. Restart Xcode
4. Restart you mac.
Hope this will also help you. Thanks!
I had this same error after updating to xcode 9.4. After doing a Product -> Clean and then Product -> Build still no luck. Then Done a clean again and restarted. After the reboot the build succeeded.
I use Xcode 9.4.1 and Xcode 10 beta 4 on macOS 10.14 beta 4. I opened the project that threw this error in both versions of Xcode.
While removing different files from bundle resources, I also got several other errors, such as "Interface builder XIB Compiler Error" and "Failed to launch IBCocoaTouchImageCatalogTool via CoreSimulator spawn".
After trying every other solution I could find, what finally worked for me is reinstalling Xcode 9.4.1, reopening the project and cleaning the project/build folder.
I speculate that this happened because there were times when both Xcode versions were open simultaneously. The two versions use common files and the simultaneous usage possibly caused an internal inconsistency in the rendering of Interface Builder.
I had this problem too, in Xcode 11;
In my case it happens after solving conflicts on .xcodeproject during merging code.
I followed below steps:
Remove storyboard from reference of project.
Select MyProject.xcodeproj and show content of that, then open
project.pbxproj by Xcode or text.
Search for storyboard name and removed all line contains that names.
Build project
Add storyboard to project.
Build project again.

xcode 8 error denied by service delegate (SBMainWorkspace)

Trying to run a build on simulator and I get this error:
The request to open "com.companyname.appname" failed.
The request was denied by service delegate (SBMainWorkspace) for
reason: Security ("Entitlement
"com.apple.frontboard.debugapplications" required to launch
applications for debugging").
This was not there when using the GM of Xcode 8, but started soon as I downloaded it again form the mac app store.
Google is no help neither is the Apple developers forum.
Any help or suggestions?
Quitting the simulator and relaunching fixed this for me.
In case anyone is wondering what is meant by "empty settings" that should be unchecked as mentioned in the answer of maricle and in the comment of Vinayak GH
At least that is what caused the problem for me.
Make Sure that you have not Checked Any "empty settings" in Product > Scheme > Edit scheme > Run > Environment variables. this cause the above issue.
check your scheme settings and make sure all empty settings are unchecked.
The only thing that worked for me was:
Simulator > Reset Content And Setting
Then clean and run your project
I have suffered from this problem for a couple days. Basically I have tried every way which can be found on the internet but none of those was helpful indeed. I even reinstalled Xcode two times (Xcode 8.3.2 8E2002, simulator iOS 10.3 14E269). And of course, there was nothing wrong with my project, scheme and empty settings.. everything seems normal. Finally I found that the best way to solve this is before you deploy your app to the simulator, you should clean your project (shift + cmd + K) and then you run again (cmd + R). This will solve your problem.
Build Setting > Combined > Linking > Mach - o - type change to executable
This worked for me because I had changed that to static before.
For me, the problem seems to be related to my being a bit too hasty to remove some red-hilighted Pod frameworks. I thought they were missing, but the entitlement error started immediately after I removed them. The error persisted until I ran pod install to reinstate the deleted Pod frameworks.
Uninstall (Delete) App from Simulator and run it again. works for me.
I followed all the other suggestions in here, and for me, it would fix if I restart Xcode and simulator, then it would work once. After that, the issue would start happening again until I did another restart.
What fixed it for me was to delete the scheme and recreate it.
I got this error when I use "/" character in target name. Fixed after deleting it.
Xcode 10: Erase All content on simulator > Quit Xcode > Reopen XCode & Rebuild worked for me
Try to change your project's Build System to New Build System...
Xcode -> File -> Workspace Setting -> Build System : New Build System.

The selected device specifies an unsupported architecture

I'm trying to launch an Objective C app built on Xcode5 on Xcode6 beta (Version 6.0 (6A215l)). I get the following message when trying to build for any platform except for iPhone 5s:
Xcode cannot run using the selected device.
The selected device specifies an unsupported architecture.
It's not even obvious how to begin troubleshoting this as I can't get to the point where the console is activated. Any pointers?
I just had this myself.
I tried a few things (closing simulator before running, having it open, resetting), but what seemed to fix it was a simple clean, build and then run
If that's not it then I have a couple of other things I did but I don't think they were responsible
I was getting the same issue when the Xcode-> Targets-> General-> Deployment->Devices selected is iPad. but I am going to run this project on iPhone. check your project.
I bumped into this issue after changing the Executable file field in the info tab of my target settings - changing this back to the default ${EXECUTABLE_NAME} fixed it for me.
I was getting the same issue and no amount of cleaning solved it. I had to remove all Swift files from my project. Then I re-added them, but made sure to unselect the "Add to Target" option in the file add dialog. Finally, manually added them to the "Compile Sources" section of your project's "Build Phases". This did it for me. (Also make sure no Swift files end up in the "Copy Bundle Resources" section of Build Phases).
Close simulator if it is opend
Press Command + shift + k (or clean the project by selecting product menu item from xcode menu) and then press Command + r (or run the project)...
iPhone3gs-->iPhone4s:armv7
iPhone5/iPhone5c: armv7s
iPhone5s --> iPhone6Plus :arm64
add architecture to BuildSetting -> Architecture

iOS5 Storyboard error: Storyboards are unavailable on iOS 4.3 and prior

I've built a small app using storyboards and it ran great. Just before final testing I decided to try it out to see if it runs on iOS 4.3. I clicked on the gray 5.0 in the project settings and selected 4.3.
The app failed to build with the following error message:
Storyboards are unavailable on iOS 4.3 and prior
Both the iPhone and iPad storyboards tell me that.
The issue that when I switched back to iOS5 target, I still keep getting these errors from both storyboards, and the product won't build!
I checked: iOS Deployment target in projects settings is 5.0
Target app deployment target is 5.0
Build settings uses iOS 5.0 SDK
What else do I need to do to restore my project to a buildable state? Is this a brand new bug or am I forgetting something?
Update: I kept getting this error even after doing a clean.
I changed the debugger in Schemes to "LLDB" and did an additional clean, the project now builds and compiles
I also got this problem and finally I solved this by following procedure:
Open XXXXXX.storyboard
Open Identity and Type tab in your right view of Xcode.
Set the value of Development in Document Versioning to "Xcode 4.2" (my default value is "Default Version (Xcode 4.1)".
Change the value of Deployment from Project SDK Version (iOS 5.0) to iOS 5.0, then back to Project SDK Version (iOS 5.0)
Rebuild the project and the error should be resolved.
The solution that worked for me was just to delete the ~/Library/Developer/Xcode/DerivedData directory for my project.
I'm just going to add this one as another possible answer here, as the first solutions worked for me several times (as I mentioned in my previous comment) until today when I couldn't get my project to compile for love nor money with the same error.
With the debugger changed and Xcode set to 4.2 and restarting several times I could not compile. However I discovered another way to get around this issue.
Select the storyboard in the left column and 'Show in Finder' and drag the storyboard to the desktop. Xcode will now change its colour to red and be unable to compile.
Clean the project, drag the storyboard back from the desktop to the directory in finder.
Then, it builds and the error goes away again.
I don't know what triggered the error originally as I'm developing under iOS5 and building for 4.3, but it seems to come up from time to time and.
This seems to be a bug in the latest XCode that I've also run into too, did try the OP's solution of changing debugger and that had no effect.
It cropped up for me since I tried storyboard with 4.3 and then tried to change back.
My solution was to close XCode, open it again and clean. Then I compiled and it worked fine.
Hope this helps others.
While other solutions helped me, they didn't work 100% of the time. I don't know enough about XCode to know how reliable this solution is, but at least it worked for me so you can try it in your project.
In the left hand side of Xcode, open the project navigator. Click the top item, which is your project. In the panel immediately to the right, you'll see a choice to choose between your project and its targets. Click the project, and then in the panel to the right, under the "Info" tab, set "Command-line builds use" to Debug (in my two projects where I was having the error, both were set to Release).
A picture is probably easiest:
Another idea: Open another project with storyboards in Xcode and try to run that. If it succeeds, you can come back to the current project and it should build. I think this clearly indicates a bug in Xcode.
After trying all the answers in here (removing the Storyboard reference, quitting Xcode, cleaning, changing debugger, etc.), none worked (with Xcode 4.5).
The only way I got it to rebuild (and it was a total guess) was to open the Storyboard file in a text editor and delete the following line:
<deployment version="1280" identifier="iOS"/>
It should be near the top of the file, in the <dependencies> section. After that, the project was built successfully and Xcode even re-added that line to the file, but, it still builds...
Go figure...! Hopefully it can help someone!
At last, an elegant workaround that seems to do the trick for me! (I sure hope it works for everyone else. This one's stubborn.)
Once your settings are back safely in iOS 5-land, try Cmd-Option-Shift K (aka "Clean Build Folder..." from the menu - hold down Option to see it), then build.
the solution is simple,
right click your storyboard file, and show in finder
then select the folder where the file is (this would probably be in the en.lproj folder)
right click on the MainStoryboard.storyboard file causing the problem and open with text edit
find the line that reads or something like this:
<development version="4300" defaultVersion="4200" identifier="xcode"/>
and change it to something like this:
<development defaultVersion="4300" identifier="xcode"/>
save the file and build. Et voila...
Ok, I tried everything above and problem still occurred. So I just remove storyboards (as reference not move to trash). then build successfully; after that I added them again; Build, And finally worked.
I was having the same problem. I tried all the above answers and all combinations and nothing worked. Then later after doing some research, I analysed that the simple fact that the error that was throwing at me was straight forward.
Just go to the Build settings and instead of selecting the xcode project file, select the product file and change the Deployment target to 5.0 or 5.1. The error should go off.! I did this in Xcode 4.3 in Lion OSX. It worked fine for me!!
I also had this problem, and nothing helped. Even opening another project and trying to build failed.
What I did, and what for me, was going to project -> info and under "Deployment Target" change iOS Deployment Target to whatever, build and than change back to whatever it was and build again.
Here is yet another random, voodoo, flail that seemed to workaround the bug just now. (after other techniques here had not helped) I renamed the storyboard file (and the entry for it in the info.plist file). Haven't tried the "drag to/from desktop" ritual yet.
Tonight, I have lost like 45 minutes to this issue. grrrrr. Ok I feel better now.
After trying all the suggestions above, without success, I got my code to compile doing the following.
Edit -> Refactor -> Convert to Objective-C ARC
rm -rf $HOME/Library/Application Support/Developer/Shared/Xcode
rm -rf $HOME/Library/Preferences/com.apple.dt.Xcode.*
rm -rf $HOME/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
rm -rf $HOME/Library/Developer/Xcode
seems to help with Xcode 4.3.2
Had similar issue. XCode would build and run other projects fine but couldn't get rid of the error on project I had changed, not even backups from server. Tried all the above solutions but nada. Here is what worked.
Uninstall XCode.
Delete user/library/developer/XCode folder.
Reinstall XCode (maybe you should start this before searching for the folder, download took me 20 minutes).
Start up, clean and build.
Worked for me. Saved me some time. Sometimes when the scalpel doesn't work it's time for the hatchet. Now I get to pick a new font to code in (this will clear your preferences)!
The only solution that has worked for me is to create another project without Storyboarding enabled, build it, then switch back to the storyboard project, clean and build.
Here is yet another random, voodoo, disconnect your iPhone if it is connected.
I simple changed deployment target to 4.0 and Development to 4.3 from MainStroyboard.
I clean the project; and restarted the mac, :) i know it sounds funny but restarting xcode didn't helped. maybe there is a cache in memory...
Then i built the project ; it was ok!

The selected run destination is not valid for this action

I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
I had that issue several times. Basically, just set the Base SDK in Build Settings to Latest OS X and it should work properly.
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
I was facing same issue in my application and I solved it by following these steps:
1. Go to Project-> Build Settings
2. Change BaseSDK to Latest OS
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to:
XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs
and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.

Resources