iOS - can't link with a main executable file (release)? - ios

I recently updated XCode to V 11.1, and since updating, for some reason when I run my app in release mode, I'm thrown the following error:
ld: can't link with a main executable file
'/Users/me/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
I have absolutely no clue how to resolve this - and I can't run my app in release mode without it (and yes, I'm using a Distribution profile). Help would be much appreciated. I've browsed a few other answers but none seem to solve this issue.
When I navigate to that file path, 'myapp' is simply an icon with a circle and a slash through it (can't be a good sign). This same thing occurs even after I clean the build folder. When I try to rebuild in release mode, the build fails and throws me the above yet again.
See full error:
Ld
/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
normal armv7 (in target 'myappTests' from project 'myapp')
cd /Users/admin/Desktop/myapp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-target armv7-apple-ios8.4 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk
-L/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk/Developer/Library/Frameworks
-F/Users/admin/Desktop/myapp/Pods/FirebaseAnalytics/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleAppMeasurement/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Base/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Maps/Frameworks -F/Users/admin/Desktop/myapp/Pods/GooglePlaces/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
-filelist /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests.LinkFileList
-Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -dead_strip -bundle_loader /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp
-Xlinker -object_path_lto -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_lto.o
-fobjc-arc -fobjc-link-runtime -lc++ -licucore -lsqlite3 -lz -framework Accelerate -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreTelephony -framework CoreText -framework Foundation -framework GLKit -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework
SystemConfiguration -framework UIKit -framework XCTest
-lPods-myappTests -Xlinker -dependency_info -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_dependency_info.dat
-o /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
ld: can't link with a main executable file
'/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)

Finally found the fix in my case. Hopefully this answer is helpful to others.
Product > Scheme > Edit Scheme, and then tap the 'Build' category on
the left hand side.
Under your appTests targets, uncheck "Run".
Problem solved.

Could you say where do you find the slashed icon - it may be a sign Xcode tries to look at a wrong path. You may easily verify it with right-click on the project from Project Navigator, show in Finder.
I recommend Changing deployment target to 8.4.
A solution might be going to Product > Scheme > Edit Scheme, choose Build and uncheck 'Run'

I was getting the ld: can't link with a main executable file error because the Build Settings between my app target and the test app were different, mainly the iOS Deployment Target.
Ensuring that these two were the same allowed the build to succeed.

Related

Invalid bitcode signature while building in Xcode

I am trying to build a very old iOS Cordova App.
It builds successfully for Simulators but, when I try to build for any real hardware, it shows error:
Ld
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS
normal armv7s
cd "/Users/atif/Desktop/Atif/Projects/MIS/MIND_MIS Ver 02.00.0002 Final"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
-L/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos
-F/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos
-filelist /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS.LinkFileList
-miphoneos-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_lto.o
-Xlinker -no_deduplicate -fobjc-link-runtime -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation
-weak_framework CoreMedia -weak-lSystem -force_load /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a
-ObjC -framework MessageUI -weak_framework CoreMotion -framework CoreLocation -framework ImageIO -framework OpenAL -framework
AssetsLibrary
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a
-framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork
-framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework
CoreMedia -framework CoreLocation -Xlinker -dependency_info -Xlinker
/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_dependency_info.dat
-o /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS
error: Invalid bitcode signature clang: error: linker command failed
with exit code 1 (use -v to see invocation)
I even tried using Xcode 7, 8 and also 9 but, I still get the same error.
Try:
Clear derived data and then reopen Xcode.
Select proper sign in / certificate, or try to re-add account in Xcode.
Make sure if your pods supported bitcode if not then you need to set bitcode to NO (Go to Project Build setting search for bitcode & set it to NO.
Or trying this may help you:
OR
Open Podfile
Uncomment this line ~> platform :ios, 'x.0'
From the command line run the following command where Podfile resides
pod update
In the xcode select Product > clean and then Product > Build
I encountered this error before..
Try this solution:
Go to Build Settings > Build Active Architecture Only
Make changes on the selected target
a) Set it as 'YES' if you're building/pushing the app directly to a device
b) Set it as 'NO' if you're trying to build the app as IPA
Hope it helps!
Go to project > targets > general > deployment info. Make sure your deployment target is same as your hardware's ios version

"libParseLib.a does not contain bitcode" error

I never had any problems when using CocoaPods up to this point (I used it a few times to integrate Parse into my iOS app). But this time I am puzzled by the message below.
When I previously used CocoaPods the project was containing only one target, this time it contains several. There may be something to be careful about, in such a case, that I don't know of. Anyway, here is the message I am getting:
ld: '..../MyApp/Pods/Parse/libParseLib.a(PFSQLiteDatabase.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE),
obtain an updated library from the vendor, or disable bitcode for this target.
for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried to change the Enable Bitcode flag at various level, but whatever I do I keep getting the same error.
Has anyone had this kind of issue? Or knows what to do about it?
Note that this link is related to my question but it unfortunately does not provide me a useful answer.
Update: I add hereafter the full text I get in the logs under Xcode, in case it may help someone to see where the problem is:
Ld /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework/Parse.framework/Parse normal arm64
cd /Users/georgewhashington/Documents/iOS/MyApp/Pods
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework -L/Users/georgewhashington/Documents/iOS/MyApp/Pods/Parse -F/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework -F/Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Bolts-framework -filelist /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse.LinkFileList -install_name #rpath/Parse.framework/Parse -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -lParseLib -lsqlite3 -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -framework AudioToolbox -framework Bolts -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Intermediates/Pods.build/Debug-iphoneos/Parse-framework.build/Objects-normal/arm64/Parse_dependency_info.dat -o /Users/georgewhashington/Library/Developer/Xcode/DerivedData/MyApp-dsxizsrrgeilklkhdylflpsafjrd/Build/Products/Debug-iphoneos/Parse-framework/Parse.framework/Parse
ld: '..../MyApp/Pods/Parse/libParseLib.a(PFSQLiteDatabase.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My solution was to disable bitcode in the project, like this
everything works fine after.

Apple Mach-O-Linker Error CocoaPods

I've been trying to get my app up and running. From what I could tell the app was missing Cocoapods as a dependency. So. I installed and added Cocoapods. But I'm still getting the same error for whatever reason. I'm an inexperienced developer trying to teach himself I must add.
Ld
/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator/Umbrella.app/Umbrella
normal i386
cd "/Users/bfarag/Desktop/The Nerdery/BRAVO.iOS.CodeChallenge"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
-L/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator
-F/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator
-filelist /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Intermediates/Umbrella.build/Debug-iphonesimulator/Umbrella.build/Objects-normal/i386/Umbrella.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-Umbrella-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration
-fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework Accelerate -framework UIKit -framework Foundation -framework CoreGraphics -lPods -lPods-Umbrella -Xlinker -dependency_info -Xlinker /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Intermediates/Umbrella.build/Debug-iphonesimulator/Umbrella.build/Objects-normal/i386/Umbrella_dependency_info.dat
-o /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator/Umbrella.app/Umbrella
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error usually occurs either when you don't have the correct frameworks (might be missing one) or when you don't have the right thing in linker flags.
Go to the main page for the app (on the navigation thing on the left click on your apps name or the top section) -> Build Settings and under Linker Flags, make sure there is nothing in your Other Linker Flags. I had this same error when I had -ObjC in my other Linker Flags.
You might also want to try adding -lPods to your Other Linker Flags or adding the CoreGraphics framework if you don't already have it.
Good luck
Open workspace file, not project file. Cocoapods automatically creates a xcworkspace file on the same directory as xcproject file.
Xcode started displaying this message and I tried pretty much everything to solve it. What finally did the trick for me was deleting all content from ~/Library/Developer/Xcode/DerivedData/

Truncated Fat File Linker Error

Although I am familiar to developing in Objective-C, I still consider myself a bit of a n00b when it comes to error interpretation. I working on an application for work that others are also working on. I believe we may have different versions of Xcode, and one developer has a PC (the others and I have a MacBook). I am using Xcode 4.5.1.
The Problem
I am getting the following Apple Mach-O Linker Error:
ld: truncated fat file. Slice from 68 to 2783300 is past end of file
with length 135 for architecture i386 clang: error: linker command
failed with exit code 1 (use -v to see invocation)
The full error is as follows (paths renamed):
Ld build/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd /Users/me/Documents/MyApp/trunk
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
-L/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/Documents/MyApp/trunk -filelist /Users/me/Documents/MyApp/trunk/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -lsqlite3.0 -v -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -framework MobileCoreServices -weak_framework Accounts -weak_framework AdSupport -weak_framework Social -framework CoreBluetooth -framework MediaPlayer -framework
QuartzCore -framework UIKit -framework Foundation -framework
CoreGraphics -framework FacebookSDK -o
/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM
3.1svn) Target: i386-apple-darwin11.4.2 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle -dynamic -arch i386 -ios_simulator_version_min 5.1.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
-o /Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp
-lcrt1.o -L/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -filelist /Users/me/Documents/MyApp/trunk/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList
-objc_abi_version 2 -lsqlite3.0 -no_implicit_dylibs -framework MobileCoreServices -weak_framework Accounts -weak_framework AdSupport
-weak_framework Social -framework CoreBluetooth -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework FacebookSDK -force_load /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
-framework Foundation -lobjc -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.ios.a
-F/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/MyApp/trunk ld: truncated fat file. Slice from 68 to 2783300 is past end of file with length 135 for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I have found close to no documentation on this error. What's the problem? How do I resolve an error like this?
I read this answer somewhere,
Symbolic links to files and folders (in your case some framework) are turned into fat files when they are moved from MAC-OS/X to Windows. So whenever we copy-paste/checkout project frameworks from your MAC to windows or vice versa it gets changed, the files are modified in terms of symlinks.
So what you can do is just checkout your project files and replace the framework alone (please note the framework you are going to replace should be downloaded fresh or copied somewhere from a MAC , NOT WINDOWS).
Hope this helps someone!

RestKit Linker error

I have been following the RestKit installation instructions but I now have an error when I try to build the app. This is for ios, iPad specific.
I get "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1"
Description:
Ld build/Debug-iphonesimulator/iDoor.app/iDoor normal i386
cd "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -
isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk "-L/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator" "-F/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator" -filelist "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/iDoor.build/Debug-iphonesimulator/iDoor.build/Objects-normal/i386/iDoor.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC - all_load -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -lxml2 -framework SystemConfiguration -framework MobileCoreServices -framework CoreData -framework CFNetwork -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator/iDoor.app/iDoor"
I am not an expert of using XCode but it almost appears that it wants to deploy as MAC OSX but I have the targets setup for ios. Any help would be appreciated.
Also I do not have RestKit.framework added (the mac osx version) and i was following the instructions for installing RestKit here: https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
After looking further i notice that in the "Link Binary With Libraries" the libRestKit.a is red. I am thinking that may be a part or the whole issue...
So I found the answer, I can't believe I missed this very simple thing. Hopefully this will help anyone else who has this issue.
In the Linker section ensure that it is "Other Linker Flags" -ObjC -all_load
I mistakenly entered -ObjC - all_load
The space after the second dash was the cause.
I forgot to include libRestKit.a and receive the same error. Adding the image to help others like me.

Resources