Xcode iOS app crash on launch: unable to create lldb_private::Process - ios

I've been trying to get my OpenFL game to build for days, and finally got to the point where the build succeeds (had a lot of trouble linking everything correctly, using severla static libraries of different shapes and forms). It finally builds, and now I Get this:
How can I debug this? In the console it just says
error: failed to launch
'/Users/joon/Library/Developer/Xcode/DerivedData/TryHarder-cynkhfxgstydmgawfivgqqiluryl/Build/Products/Debug-iphoneos/TryHarder.app/TryHarder'
-- unable to create lldb_private::Process
I have rebooted computer, mobilde device, cleaned, rebuilt, uninstalled, which is what many sources recommend in the case of an on-launch crash with no info. Nothing does the trick however. Some sources recommend to set debugger to GDB, which is no longer possible in XCode 6 it seems.
I'm not sure how to debug this any further.

I began to get this when I changed Mach-O type to "Bundle" in Targets > build settings > Linking. I won't claim to know much about this, but perhaps it will help..

Set the Mach-O type to Executable and it will work absolutely fine. you can find it in Targets > build settings > Linking

Related

Xcode and Unity missing library 'lGoogleUtilities'

I am working on an App that is made with Unity and I have to build it in Xcode to get it in the App store.
Now I'm running into a problem here. I am getting this error:
library not found for -lGoogleUtilities
However, when I build the app in debug mode and test it on my iPad, there aren't any troubles. But when I try to build it for TestFlight (Toolbar -> Product -> Archive) that error occurs.
I've followed this tutorial to get it working in debug mode (because I had that error there too before)
https://youtu.be/YHHj1bZUbsc (from 6:20).
I am using the 'Google Admob', 'CloudOnce' and 'Play Services Resolver' plugins for Unity. In the debug version the error (before I fixed it in the debug version), was caused by 'Google Admob'. I feel like I am missing a framework or something in the release build.
Alright, so after another few hours of trying and searching I found out that I was actually opening the wrong file, you would think .xcodeproj would be the correct extension, but actually you have to open the .xcodeworkspace file. It compiled for me.

Migrating SceneKit app from xc10 > xc11, I encounter "xcrun: error: unable to find utility "scntool", not a developer tool or in PATH"

Due to character limits in the title, allow me to elaborate on what is happening.
I have an application that builds with no warnings & errors while using Xcode 10.2.1, but I would like to test it in the latest Xcode 11 beta.
However, it produces an error during the build process, yet oddly enough, the app properly launches and is usable on a simulator.
The error:
xcrun: error: unable to find utility "scntool", not a developer tool
or in PATH
Initially, I thought it was possible that the spaces in my app's name were a problem, so I quickly renamed it to use _ in place of the spaces, but that did not work.
Rebuilding the app after I removed the spaces also shows the following warning:
copySceneKitAssets: warning: Failed to copy SceneKit assests because
scntool failed to process the following resources:
/Users/someidiot/Library/Developer/Xcode/DerivedData/Build/MyAmazingApp/Products/Debug-iphonesimulator/My_Amazing_App.app/art.scnassets/Game.scn
And yes, the file is there:
Out of curiosity, I purged my derived data in case something was causing problems there.
rm -rf ~/Library/Developer/Xcode/DerivedData
However, the same scenario as before... warnings & errors upon building, but the app successfully launches on the simulator.
My concern here is that if something is genuinely wrong, I'd like to fix it before it becomes an issue, but at the same time, the app does launch successfully.
Unfortunately, I do not have access to an iOS 13 device at this time to test on hardware.
After any new Xcode installation, or even when switching between versions of Xcode, always go into Xcode's Preferences and, under Locations, adjust the Command Line Tools pop-up menu to point to the version of Xcode you are using.
Otherwise, something like xcrun, which means "run a tool inside Xcode", will be looking in the wrong Xcode.

How to get CocoaPods-based project to work in the simulator?

I'm trying CocoaPods for the first time, because I've inherited a project that relies on it for several libraries. Articles like this one make it sound like it should all Just Work, even in the simulator.
But it's not working for me — I get an "Undefined symbols for architecture i386" for every class defined in a pod library. Moreover,there are a bunch of ld warnings along the lines of "ld: warning: ignoring file blah/blah/Build/Products/Debug-iphonesimulator/SocketRocket/libSocketRocket.a, file was built for archive which is not the architecture being linked (i386)". I get one of these for each CocoaPods library.
How do I get Xcode to build the pod libraries for the simulator (or link the correct ones, if they're being built)?
OK, I've managed to make it work, though I don't know if it requires both of these steps:
Deleted the derived data, as suggested here
In the Pods project, changed "Build Active Architectures Only" to "No" for Debug as well (it was already set to No for Ad Hoc and Release), as suggested by some of the comments here.
I know that step 1 alone didn't do it... but I don't know whether step 2 by itself would have sufficed. Certainly both of them together did the trick for me.
Adding this answer in case it's helpful to anyone.
To my surprise, it was the simulator version that I was using; iPhone 5 wasn't supported. Xcode gave me no sign of this until I switched to an iPhone 6 simulator, which worked. When switching back to iPhone 5, Xcode then complained that "MyApp does not have an architecture that iPhone 5 can execute."
This is all true and I knew that, but I didn't think of it as the previous error Xcode was giving me was that -lPods-MyApp was missing.

XCode:4.6 Lion:10.8 IOS 6.1 error: SBTarget is invalid

XCode:4.6 Lion:10.8 IOS 6.1 error: SBTarget is invalid , how to solve this?
After hundreds of times testing, I find a way that can help the programme run,
here is it:
When you first meet SBTarget is invalid, choose Product --> Clean
Run again, this time you may also get error: SBTarget is invalid, it doesn't matter.
Turn off the XCode totally, 'totally' means that the Xcode icon should not appear in the Dock.
Double click your project file(xxx.xcodeproj , the blue one) to start Xcode, run again. (Do not Clean this time), and it runs ok.
Let me know if this can help you or you have any other methods. Thx
I had this issue while incorporating the Facebook SDK into my app. The error would alternate between SBTarget is invalid and telling me that my architecture was incompatible with my device so it would not launch. If I followed alexqinbj's advice it would run the app once but then it would go right back to having the same error again. I tried messing with architectures and build settings and removing derived data but in the end it really was just a duplicate file in my file structure. Facebook told me to add their SDK and then to add a folder (that the SDK file already contains). Once I saw that it was just a matter of removing the duplicate file. I've heard of this error happening with duplicate plists as well. Good luck
Indeed, the root cause (in Facebook integration) is the duplicate resources in the Facebook SDK (as per their instructions). When I deleted the resource files (remove references only), this problem went away permanently. Not sure why Facebook instructions ask you to drag the resources bundle over to the Facebook SDK framework you just brought in...
TARGETS -> Build Phases, remove info.plist from Copy Bundle Resources. Clean and run. It works for me.
Unfortunately, the accepted answer didn't work for me. I can provoke this error with 100% certainty. It is not necessarily an internal consistency issue with XCode that can be resolved through cleaning, rebooting and rebuilding.
SBTarget is Invalid is an internal XCode error. It happens when attaching a debugger and the architectures specified in the XCode project do not match up with the binary.
On OS X, you can diagnose this by going to the binary on the hard drive and typing:
lipo -info <bin>
Then comparing this to the build settings ARCH and ONLY_ACTIVE_ARCH. They must match. It is not enough for ARCH to be a subset of the possible architectures contained within the binary.
There are any number of reasons why they might not match up. Here are some suggestions:
You are using an external build scheme. XCode therefore does not dictate the contents of the binary. The build settings merely tell XCode what to expect when launching GDB or LLDB.
The executable specified for launch in the scheme is not correct. If it can't find the executable, the architectures will not be present.
This error has a very distinct cause in my case. Whenever "Expand Build Settings in Info.plist File" was set to "NO" in Xcode's "Build Settings", this message came up. Will submit rdar to Apple.

PhoneGap Xcode Missing Header files on Build 'Cordova/CDVViewController.h' file not found

I am using PhoneGap 2.2.0 and XCode 4.5.2.
I can test my programs in the simulators, and I can put them on my devices to test them.
But I simply cannot build for distribution. It always fails with the following error:
my-projevt-path/Classes/AppDelegate.h:30:9: 'Cordova/CDVViewController.h' file not found
I've seen this problem around the web and still can't make it work, given whatever solutions have been posted.
I've changed things in Build Settings, I've reinstalled PhoneGap, I've run new lines in terminal, I've done my app over starting a new PhoneGap project from scratch, I've checked preferences in the build location in Xcode... I can't figure this out AT ALL.
Please, can anyone help? I've been working on this for days.
Thanks!
Problems in Xcode
If you have compilation problems related to missing headers, the build products should build into the same build directory. You may need to set the preference "Xcode Preferences -> Locations -> Derived Data -> Advanced…" to "Unique". This is the default setting for Xcode on a fresh new install, if you upgraded from older versions of Xcode, you might have a legacy preference in there that you need to update.
Found the answer!!!
Yes I am getting the same problem yeah and some help could be great.....
I followed all the instructions even with the ./update_cordova_subproject path as well it does not work. Also I solved the locking problem but I could not find the solution to this problem
The answer, in my case, had seemingly nothing to do with the error message that was being sent. Missing header files? That didn't seem to be the issue. Or, at least, not the direct cause of the issue.
This was an issue with my provisioning/certificates being somehow not right. I had re-created them several times, but it continued to be an issue.
I sent the job to another developer, who opened it on his machine, revoked my certificates and created new ones, and built it without changing anything else. He forwarded me the certificate, the provisioning, and an archive of the job. I opened the archive in xCode and validated it and uploaded it. And it was fine.
If you have got this problem, be certain your certificate/provisioning is set up right. I thought mine was, but apparently it wasn't? The "Apple Process" is definitely weird, and when certificates / profiles gets messed up, problems arise.
I was having the same problem and just solved it! First of the problem may very well be because of your distribution provisioning files... but when you look at the Project Navigator in xCode at the top level you have your Project and inside you have the CordovaLib.xcodeproj click on this file and you will see the iOS Deployment target. Make sure the proper IOS version is selected there. This is 1/2.
2) Then you need to duplicate the Release configuration and rename it Distribution. While the CordovaLib.xcodeproj is selected make a build and then build the actual project. This worked smoothly for me.
Add this line to your Build Settings -> Header Search Paths:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.

Resources