Cocoapods -lPods-{pod name} mach-o linker error - xcode

Using multiple schemes for build project, i'm getting this error across all scheme archiving processes:
Ld /Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/IntermediateBuildFilesPath/project.build/ReleaseProd-iphoneos/project.build/Objects-normal/arm64/project normal arm64
cd /Users/daniel.kim/Projects/7-11/project-ios-2-0
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/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/BuildProductsPath/ReleaseProd-iphoneos -L/Users/daniel.kim/Projects/7-11/project-ios-2-0/Pods/FlurrySDK/Flurry -F/Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/BuildProductsPath/ReleaseProd-iphoneos -filelist /Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/IntermediateBuildFilesPath/project.build/ReleaseProd-iphoneos/project.build/Objects-normal/arm64/project.LinkFileList -dead_strip -ObjC -lFlurry_5.4.0 -lPods-AFNetworking -lPods-AFOAuth2Client -lPods-AsyncImageView -lPods-Bugsnag -lPods-FXPageControl -lPods-FlurrySDK -lPods-ISO8601DateFormatter -lPods-MBProgressHUD -lPods-MMDrawerController -lPods-Mantle -lPods-RSBarcodes -lc++ -lz -framework AVFoundation -framework CoreGraphics -framework CoreImage -framework Foundation -framework MediaPlayer -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -weak_framework AdSupport -weak_framework StoreKit -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a -Xlinker -add_ast_path -Xlinker /Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/IntermediateBuildFilesPath/project.build/ReleaseProd-iphoneos/project.build/Objects-normal/arm64/project.swiftmodule -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lPods -Xlinker -dependency_info -Xlinker /Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/IntermediateBuildFilesPath/project.build/ReleaseProd-iphoneos/project.build/Objects-normal/arm64/project_dependency_info.dat -o /Users/daniel.kim/Library/Developer/Xcode/DerivedData/project-dmzuaarzxovfpwglmdnamvbivecp/Build/Intermediates/ArchiveIntermediates/project-release-prod/IntermediateBuildFilesPath/project.build/ReleaseProd-iphoneos/project.build/Objects-normal/arm64/project
ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using the xcworkspace, have tried a fresh pod install, have gem updated system as well as cocoapods, change associated values to $(inherited) in things such as the library search paths, checked the schemes to ensure that there were no extraneous processes for each and every scheme.
The schemes are only used to change environment variables for our test / production API servers when it's a debug versus release build.
Have tried changing every possible related setting in xcode that I could think of.
UPDATE: As a note, the first scheme doesn't fail when building, with is my debug-prod scheme. It archives and works successfully. There is some mention on the troubleshooting cocoapods page about only the first target being specific automatically by cocoapods and that link_with needs to be used to specify other targets, but all I have is 4 schemes and one target, not 4 targets...
What do i need to do to specify and direct cocoapods to those builds?

Under Edit Scheme -> Archive -> Archive -> Build Configuration, just need to set the proper configuration...
That solved the issue, they were all pointed to the wrong default Build Configs created by XCode Debug or Release....

Make sure your other imported xcode project implemented these custom schemes as well.
More information can be found in my post here:
Swift frameworks do not work with build configurations named other than 'Debug' or 'Release': No such module

I managed to get this working by making sure each scheme was visible (Product->Scheme->Manage Schemes->Tick 'Show' or each pod). Then I built each pod project individually.
After that I could build my project. I cannot explain why this worked.

I had the same issue and the problem was that I was opening the wrong file. Make sure you open your .xcworkspace file.

Related

Trying to add TheAmazingAudioEngine via cocoapods and failing miserably

I created a podfile:
source 'https://github.com/CocoaPods/Specs.git'
target :MyApp do
pod 'TheAmazingAudioEngine'
end
ran pod setup, pod install, and pod update... Got:
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using TheAmazingAudioEngine (1.5.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1
total pod installed.
Then based off of all the advice/suggestions of various SOF posts involving this same sort of error, I did the following:
Made sure the Build Active Architectures Only are identical between my project/target + Pods
Added $(inherited) to the top of other linker flags
Added $(inherited) to Framework search paths
Added $(inherited) to Library Search Paths
(This shows build/Debug-iphoneos/TheAmazingAudioEngine"
Added $(inherited) and COCOAPODS=1 to Preprocessor Macros
Made sure Link Binary With Libraries has libPods-MyApp.a
Deleted the Pods folder, Podfile.lock and my .xcworkspace file, and did "pod install && pod update"
Cleaned the project
...
basically, no matter what I do, when I build, I always get:
Ld /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/myapp.app/myapp normal arm64
cd /Users/patrick/MyApp
export IPHONEOS_DEPLOYMENT_TARGET=6.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 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos -L/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/TheAmazingAudioEngine -L/Users/patrick/MyApp/build/Debug-iphoneos -F/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos -filelist /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/myapp.LinkFileList -miphoneos-version-min=6.0 -dead_strip -fembed-bitcode-marker -ObjC -ObjC -lTheAmazingAudioEngine -framework Accelerate -framework AudioToolbox -ObjC -lz -fobjc-arc -fobjc-link-runtime -lPods-MyApp -framework CoreMIDI -framework Security -framework CoreData -framework StoreKit /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libCocosDenshion.a -framework Accelerate -framework CoreLocation /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libkazmath.a -framework CoreMotion -framework CoreText -framework AudioToolbox -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -framework GameKit /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libcocos2d.a -Xlinker -dependency_info -Xlinker /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/myapp_dependency_info.dat -o /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/myapp.app/myapp
ld: warning: directory not found for option '-L/Users/patrick/MyApp/build/Debug-iphoneos'
ld: library not found for -lTheAmazingAudioEngine
clang: error: linker command failed with exit code 1 (use -v to see invocation)
1) Go to Build Settings
2) Select Other Linker Flags
3) Add -l"TheAmazingAudioEngine"
4) Rebuild
Try it

Apple Mach-O Linker (Id) Error for OpenFrameworks

I am using XCode 7.1 on Mac OS X 10.11.1.
I am using an addon called ofXopenNI with openFrameworks, which is basically an OpenNI interface for openFrameworks. It has some requirements which I installed and linked to my XCode project. Still, there's one linking error that I am unable to fix. Here it is (I pasted an image so that I don't miss out on anything):
The problem is that libXnFormats is already included in my project, and yet this issue comes up. This is how I think it's included in the project:
(The second one)
I know there are a lot of Mach-O linking error questions on SO, but this seemed specific. Anyone knows a fix to this?
Here's the error message in text format (since it was asked for):
Ld bin/huReconDebug.app/Contents/MacOS/huReconDebug normal x86_64
cd /Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon
export MACOSX_DEPLOYMENT_TARGET=10.11
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/bin -F/Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/bin -F/Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/../../../libs/glut/lib/osx -filelist /Users/ranveer/Library/Developer/Xcode/DerivedData/huRecon-eiqxyontximqaegxzkvzzaxrfiqs/Build/Intermediates/huRecon.build/Debug/huRecon.build/Objects-normal/x86_64/huReconDebug.LinkFileList -mmacosx-version-min=10.11 -dead_strip ../../../libs/poco/lib/osx/PocoCrypto.a ../../../libs/poco/lib/osx/PocoData.a ../../../libs/poco/lib/osx/PocoDataODBC.a ../../../libs/poco/lib/osx/PocoDataSQLite.a ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoNetSSL.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoZip.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a ../../../libs/openssl/lib/osx/crypto.a ../../../libs/openssl/lib/osx/ssl.a ../../../libs/glfw/lib/osx/libglfw3.a ../../../libs/FreeImage/lib/osx/freeimage.a ../../../libs/freetype/lib/osx/freetype.a ../../../addons/ofxAssimpModelLoader/libs/assimp/lib/osx/assimp.a ../../../addons/ofxKinect/libs/libusb-1.0/lib/osx/usb-1.0.a ../../../addons/ofxOpenCv/libs/opencv/lib/osx/opencv.a -stdlib=libstdc++ -framework Accelerate /Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/bin/data/lXnFormats.dylib -lXnFormats -framework QTKit -lXnDDK -framework GLUT -lusb-1.0.0 /Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/bin/data/XnFormats.dylib /Users/ranveer/BTP/openFrameworks/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a -framework AGL -lXnVNite_1_5_2 -lnimRecorder -framework ApplicationServices -lXnVCNITE_1_5_2 -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -lnimCodecs -lXnVFeatures_1_5_2 -framework CoreServices -lXnCore -framework OpenGL -lOpenNI -framework QuickTime -lnimMockNodes -lXnDeviceSensorV2KM -framework AppKit -lXnDeviceFile -framework Cocoa -lXnVHandGenerator_1_5_2 -framework IOKit -framework CoreVideo -Xlinker -dependency_info -Xlinker /Users/ranveer/Library/Developer/Xcode/DerivedData/huRecon-eiqxyontximqaegxzkvzzaxrfiqs/Build/Intermediates/huRecon.build/Debug/huRecon.build/Objects-normal/x86_64/huReconDebug_dependency_info.dat -o /Users/ranveer/BTP/openFrameworks/apps/myApps/mac-huRecon/bin/huReconDebug.app/Contents/MacOS/huReconDebug
And then,
ld: library not found for -lXnFormats
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had a similar issue that I got -lXnDDK linker error instead of -lXnFormats. I assume you created new groups by including include and lib folders under ofxOpenNI addon directory. Also, copied the lib folder into bin/data/openni.
I just add bin/data/openni/lib to the Library Search Paths in Build Settings.
I am using Xcode 7.0.1 on MAC OS X 10.10.5.
Rename the library to XnFormats rather than libXnFormats.
I had a strange issue on Xcode recently, when even when using the -l command (which should prefix lib) did want to work for a custom library.
This might be an Xcode bug. However this should get it working for you now.

Undefined symbols after crashlytics update

I have a problem after update of crashlytics framework in my project, through fabric app of course, it is linker error precisily, log below.
Ld /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator/InternalApp.app/InternalApp normal x86_64
cd /Users/losiennik/temp/InternalApp-ios-fork_DONOTREMOVE
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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator -F/Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator -F/Users/losiennik/temp/InternalApp-ios-fork_DONOTREMOVE -filelist /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/Objects-normal/x86_64/InternalApp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-ActivateYourSalon -lPods-CocoaLumberjack -lPods-Foursquare-API-v2 -lPods-GZIP -lPods-MBProgressHUD -lPods-MLPAutoCompleteTextField -lPods-MTDates -lPods-UICKeyChainStore -lPods-UIResponder+KeyboardCache -lPods-WYPopoverController -lPods-zipzap -lc++ -lz -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -stdlib=libc++ -mios-simulator-version-min=7.0 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/InternalApp.app.xcent -framework EventKit -framework MessageUI -framework Crashlytics -framework QuartzCore -framework MapKit -framework CoreLocation -framework CoreGraphics -framework UIKit -framework Foundation -lPods -framework Fabric -Xlinker -dependency_info -Xlinker /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/Objects-normal/x86_64/InternalApp_dependency_info.dat -o /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator/InternalApp.app/InternalApp
Undefined symbols for architecture x86_64:
"_CLSLog", referenced from:
-[IAPSyncManager processSuccessfulHTTPRequest] in IAPSyncManager.o
-[IAPLogService writeContentsOfURL:toStream:] in IAPLogService.o
-[IAPServerObjectMapping serializedPrimaryKeyToJSONStringFrom:forObject:] in IAPServerObjectMapping.o
"_CLSNSLog", referenced from:
___65-[IAPWeekDashboardViewController asyncInternalAppFetchSuccess:failure:]_block_invoke in IAPWeekDashboardViewController.o
-[IAPSyncManager prepareForSynchronizationInForeground:] in IAPSyncManager.o
___50-[IAPSyncManager reenableIdleTimerAfterTwoMinutes]_block_invoke in IAPSyncManager.o
-[IAPSyncManager reenableIdleTimer] in IAPSyncManager.o
-[IAPJSONValidator validateJSONWithError:] in IAPJSONValidator.o
-[IAPSynchronisationRelationship stringWithID:] in IAPSynchronisationRelationship.o
_POSTDataDictionary in IAPSyncConstants.o
...
"_OBJC_CLASS_$_Crashlytics", referenced from:
objc-class-ref in IAPSyncManager.o
objc-class-ref in Crashlytics+Utilities.o
l_OBJC_$_CATEGORY_Crashlytics_$_Utilities in Crashlytics+Utilities.o
objc-class-ref in IAPAppDelegate.o
(maybe you meant: _OBJC_CLASS_$_CrashlyticsPlaceholderStatic)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried to fix that in a lot of manners, but I cannot. Ways that I tried:
Xcode Clean action on the project
deleting content of /Users/losiennik/Library/Developer/Xcode/DerivedData
removing and adding again Crashlytics.framework and Fabric.framework in Xcode 6.3.1 target Build Phases from Link Binary from Libraries
deleting those framework files from the project physically and adding them again from the other project where I've installed frameworks from the scratch
deleting /var/folders content
I've made every possible combination of that possible solution, and also tried with running and killed xcode, restarting OS also. Nothing works.
Do you have any other ideas? Maybe somebody know where else Xcode stores temporary files which can be used while compiling and linking processes? Do somebody have similar experience while updating that framework?
It turned out that the cause of the problem was related with the other problem that I had. That problem caused that I couldn't register specific app ID with fabric plugin help which was previously added to our old organization account. I deleted that app ID from that old organization but still couldn't add one to the new organization.
Thanks to fabric support member, it turned out that my app ID was in weird state on backend side. When that was corrected, my app ID appeared on our organization account and then the fabric plugin downloaded the proper version of Crashlytics.framework file. After that I don't have any problems with Apple Mach-O Linker Error related to Crashlytics binaries.
Summarising, when only you have the problem described above or the problem with adding app ID, write directly to fabric support and don't waste your time.
Thanks fabric team :)!
If you decided not to use CocoaPods then you obviously used the 2nd option, putting a Run Script inside Build Phases:
./Fabric.framework/run YourUniqueId!#$##%!#$%##$^#$3295209582523##%!#$#%!#%235
The run script will copy the files:
Crashlytics.framework
Fabric.framework
Into your project directory, but sometimes it is not enough and you also need to copy/reference the 2 frameworks into your Xcode project.
Importing the 2 frameworks is possible (before the above copying procedure) but Xcode needs a reference to them.
Should compile fine afterwards.
This issue came to me when i updated Xcode. It got fixed after uninstalling and installing newer version rather than updating.

Xcode 6.1 & Cocoapods Integration/Dependency Error - library not found for -lPods-{Pod Name}

I just upgraded to OS 10.10 Yosemite and Xcode 6 and am having trouble getting my iOS app with CocoaPods dependencies to build.
After doing a clean and build I get an Apple Mac-O Linker Error as shown below
Ld /Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Products/Release-iphonesimulator/ToWatchList.app/ToWatchList normal i386
cd "/Users/nick/Dropbox/ToWatchList/ToWatchList App"
export IPHONEOS_DEPLOYMENT_TARGET=8.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/iPhoneSimulator8.1.sdk -L/Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Products/Release-iphonesimulator -F/Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Products/Release-iphonesimulator -F/Users/nick/Dropbox/ToWatchList/ToWatchList\ App/Pods/CrashlyticsFramework -F/Users/nick/Dropbox/ToWatchList/ToWatchList\ App -filelist /Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Intermediates/ToWatchList.build/Release-iphonesimulator/ToWatchList.build/Objects-normal/i386/ToWatchList.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-AuxRepo -lPods-CrashlyticsFramework -lPods-Reachability -lPods-SSKeychain -lPods-SVProgressHUD -lPods-Tapstream -framework CoreGraphics -framework Crashlytics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -lz -lPods -Xlinker -dependency_info -Xlinker /Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Intermediates/ToWatchList.build/Release-iphonesimulator/ToWatchList.build/Objects-normal/i386/ToWatchList_dependency_info.dat -o /Users/nick/Library/Developer/Xcode/DerivedData/ToWatchList-cesjouowyxujojcvvxsvupagyozc/Build/Products/Release-iphonesimulator/ToWatchList.app/ToWatchList
ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems to have something with the OTHER_LDFLAGS (Other Linker Flags) on my project because if I reorder my pods by going to my application target -> Build Settings -> Other Linker Flags and reorder the items on that list, I can get other pods to generate Linker Errors in the same way (so at least it's not a problem with AFNetworking). Cocoapods and Xcode are not generating any other errors or warnings.
So far I've tried:
Updating to the newest version of Cocoapods with: sudo gem update cocoapods
Commenting out all the pods in my podfile, running pod update to clear them all out and then uncommenting them and run pod update to re-download and install all the dependancies.
Deleting my pod folder and lock file then running pod install to reinstall pods from scratch
Unfortunately none of these steps fixed this error, so I'm guessing there is some Build Setting that I need to tweak in my project but I am unsure what to try next.
Double check that you are opening the .xcworkspace file and not the .xcodeproj file, that's a common mistake that can lead to this kind of problems.
To fix this I had to delete libPods.a under Application Targets -> General -> Linked Frameworks and Libraries. It was highlighted in red (meaning unfound) but I didn't need to replace it; simply clearing it was enough.
For me, the problem was that my project's and Cocoapod's build configurations didn't match, which (I think) meant they were looking in different directories for the compiled libraries.
I had the same issue.
My problem was the the 'Build Active Architectures' on my Target and my Pods target did not match up exactly.
After making them identical the issue was resolved.
Go to "Project Target -> Build Settings -> Preprocessing -> Preprocessor Macros". Set "COCOAPODS=1" in all Debug, Integration, Release under "Preprocessor Macros"
Add the following in "Other Linker Flags" under "Project Target"
$inherited
-ObjC
-lc++
-all_load
Had a same issue after upgrading Deployment target from 7.0 to 8.0 and enabling use_frameworks!

Twilio + Apple o mach error

When I try to run the code I get an Apple O-Mach Linker Error. I'm running up to date XCode 4.6, updated yesterday. I'm running 10.8.2 and here is the error code I get.
A few weeks ago I wasn't getting this issue so I don't know if it's updated SDK from Twilio, the XCode update or what. I've also got one of the library's (libTwilioClient.a) thats red in the frameworks section (This is my first iOS and XCode experience). I've tried linking it and then I get 68 errors about other stuff throughout the program not connecting.
Any help? Oh, BTW, I'm just using the HelloMonkey Example from Twilio's SDK, I haven't changed a single thing except the line pointing to my php server for authentication. Also, I've check for any .m in the headers and there are none. I was hoping that it would be smooth sailing since it's coming from Twilio and it's the "Get Started Quick"... so much for that :/
Ld /Users/Animal/Library/Developer/Xcode/DerivedData/HelloMonkey-
acqupeuamziuogblpxusdjhityyf/Build/Products/Debug-iphonesimulator/HelloMonkey.app
/HelloMonkey normal i386
cd "/Users/Animal/Downloads/TwilioClient-1.1.1-dbefc0b/Quick Start/HelloMonkey
"
setenv IPHONEOS_DEPLOYMENT_TARGET 4.2
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"
/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.1.sdk
-L/Users/Animal/Library/Developer/Xcode/DerivedData/HelloMonkey-acqupeuamziuo
gblpxusdjhityyf/Build/Products/Debug-iphonesimulator "-L/Users/Animal/Downloads/
TwilioClient-1.1.1-dbefc0b/Quick Start/HelloMonkey/../.." -F/Users/Animal/
Library/Developer/Xcode/DerivedData/HelloMonkey-acqupeuamziuogblpxusdjhityyf/
Build/Products/Debug-iphonesimulator -filelist /Users/Animal/Library/Developer/
Xcode/DerivedData/HelloMonkey-acqupeuamziuogblpxusdjhityyf/Build/Intermediates/
HelloMonkey.build/Debug-iphonesimulator/HelloMonkey.build/Objects-normal/i386/
HelloMonkey.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load
-fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.2
-framework AVFoundation -framework Foundation -framework UIKit -framework
CoreGraphics -framework AudioToolbox -framework CFNetwork -framework
SystemConfiguration -lTwilioClient -o /Users/Animal/Library/Developer/Xcode/
DerivedData/HelloMonkey-acqupeuamziuogblpxusdjhityyf/Build/Products/
Debug-iphonesimulator/HelloMonkey.app/HelloMonkey
ld: library not found for -lTwilioClient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You have to add, other two libraries libcrypto.a and libssl.a along with libTwilioClient.a, then clean and build the project. You are good to go. You can find those libraries in the 'Libraries' folder of the unzipped Twilio bundle. Hope this will help.

Resources