I am trying to compile an existing xcode project written in swift. The project uses Alamofire. I installed xcode 8 beta and opened the project. There were many errors with Alamofire which I learned need to be updated to version 3.2.1.
I edited my Podfile and fixed the version number then ran pod update alamofire. Instead of only updating Alomfire, every pod was updated. This is apparently a bug.
The Podfile contains the directive use_frameworks! After updating the pods, the pods/headers directory was completely empty, without either Public or Private directories and the project failed to build with 356 missing file errors.
Changing the build search settings for ALWAYS_SEARCH_USER_PATHS to no (or yes) in accordance with a recommendation here https://github.com/CocoaPods/CocoaPods/issues/4605#issuecomment-208822149 then deleting the pods and running pod install again did nothing.
There are a number of different questions on stackoverflow asking the same question with no answers. Here is a list of the ones I can find.
Pods/Headers empty after pod install
Empty Pod Headers Folder after `pod install`
After pod install Public folder is empty
From Pods-Myproject.debug.xconfig
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack" "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer" "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD" "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers" "$PODS_CONFIGURATION_BUILD_DIR/RestKit" "$PODS_CONFIGURATION_BUILD_DIR/SOCKit" "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit" "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0" "${PODS_ROOT}/Crashlytics/iOS" "${PODS_ROOT}/Fabric/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '#executable_path/Frameworks' '#loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking/AFNetworking.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0/Bolts.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack/CocoaLumberjack.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0/DBAlertController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0/FBSDKCoreKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0/FBSDKLoginKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer/ISO8601DateFormatterValueTransformer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD/MBProgressHUD.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0/RESideMenu.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers/RKValueTransformers.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RestKit/RestKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SOCKit/SOCKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit/TransitionKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0/iCarousel.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Crashlytics" -isystem "${PODS_ROOT}/Headers/Public/Fabric"
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "AFNetworking" -framework "Alamofire" -framework "Bolts" -framework "CocoaLumberjack" -framework "Crashlytics" -framework "DBAlertController" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "Fabric" -framework "ISO8601DateFormatterValueTransformer" -framework "MBProgressHUD" -framework "RESideMenu" -framework "RKValueTransformers" -framework "RestKit" -framework "SOCKit" -framework "Security" -framework "SystemConfiguration" -framework "TransitionKit" -framework "UIKit" -framework "iCarousel"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}/Pods
I really need to find a solution to this problem so I would be grateful if anybody can answer this question.
git add -A followed by Product -> Clean removed all errors except Alamofire.
When you want to update a particular POD, you run pod update PODNAME as given in the Docs. I suggest you delete all the pods and run pod install with the latest version of Alamofire.
Related
I am opening .xcworkspace of my Ionic 3 project and trying to run it on my device but I suddenly get the following error in Xcode:
Ld /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64
cd /Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.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/iPhoneOS10.3.sdk -L/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos -L/Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios/MyApp/Plugins/cordova-plugin-google-analytics -F/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos -F/Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework -FMyApp/Plugins/com.googlemaps.ios -filelist /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a -framework Accelerate -framework CoreData -framework CoreLocation -framework CoreText -framework GLKit -framework ImageIO -lc++ -lz -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework GoogleMapsBase -framework GoogleMaps -framework GoogleMapsCore -framework EventKit -framework EventKitUI -framework AVFoundation -lGoogleAnalyticsServices -lAdIdAccess -framework AdSupport -lsqlite3 -weak_framework WebKit -lz -Xlinker -dependency_info -Xlinker /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_dependency_info.dat -o /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp
duplicate symbol _OBJC_CLASS_$_CDVLogger in:
/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/CDVLogger.o
/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a(CDVLogger.o)
duplicate symbol _OBJC_METACLASS_$_CDVLogger in:
/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/CDVLogger.o
/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a(CDVLogger.o)
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't understand what is duplicated... any help would be really appreciated.
To solve the problem please have a look over this blog post from Cordova iOS 4.5.
http://cordova.apache.org/announcements/2017/09/08/ios-release.html
You need to remove plugin "cordova-plugin-console" that is installed by default when generating a new Ionic project. Now this is in core part of cordova for iOS.
Since duplicate symbols are there, just removed "-ObjC" from both Targets and Project:
Build Settings -> Linking -> Other linker flags.
also try to remove any unwanted libraries from
Targets -> Build Phases -> Link Binary with Libraries
The problem here is cordova-ios#latest.
And we could fixed this issues with:
Uninstall cordova-ios first, with npm uninstall cordova-ios
Install cordova-ios with npm install cordova-ios#4.4.0
After that we should add platform with ionic cordova platform add ios#4.4.0
The last one, run ionic cordova build ios, that open with xcode and build with your settings.
Since cordova IOS 4.5 they are including cordova-plugin-console, which results in the plugin being duplicated.
To fix just run:
cordova plugin rm cordova-plugin-console
The solution #arunraj414 worked for me, from xcode you can solve it this way:
Delete either one
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
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.
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!
In my current project I am unable to set the "Other Linker Flags" as I have in others projects. No matter what I put in the "Other Link Flags" section of my xcode project settings it does not show up in the detailed build log, and the desired linking does not happen:
Ld build/Debug-iphonesimulator/MyProject.app/MyProject normal i386
cd /Users/theUser/Development/xm8vc/MyProject/trunk
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/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator -L/Users/theUser/Development/xm8vc/MyProject/trunk -F/Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator -F/Users/theUser/Development/xm8vc/MyProject/trunk -filelist /Users/theUser/Development/xm8vc/MyProject/trunk/build/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/MyProject.LinkFileList -mmacosx-version-min=10.6 -lxml2 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework QuartzCore -framework AVFoundation -framework AddressBook -framework AddressBookUI -framework AudioToolbox -framework OpenGLES -framework CFNetwork -framework SystemConfiguration -framework MediaPlayer -lxml2 -lz -framework SpeechKit -o /Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator/MyProject.app/MyProject
Is there something that would cause xcode to ignore the "Other Linker Flags?"
Where are you setting these flags? You can set flags like this at various levels in your project - project settings, target settings, etc. There's a full description in Working with Xcode Build Settings. It's possible that, for example, you are setting it in your project settings, and then it is being overridden by your target settings.