I had a project that was working fine and I decided to update cocoapods. I ran
pod install after cocoapods updated, and now I'm getting this error:
ld: library not found for -lStripe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I know this is a common cocoapods error/problem. I've scoured the internet for the last 12 hours trying every possible solution. Things I've done:
Made sure I'm opening the workspace
Reinstalled cocoapods
Downgraded cocoapods to a previous version (to 0.33.1)
Ran deintegrate and removed cocoapods
Reinstalled cocoapods again
Made sure Build Active Architecture Only is set to NO on both Pod and Target
Tried many variations for Other Linker Flags (see below for current setup)
My Framework Search Paths and Library Search Paths each start with $(inherited)
Other Linker Flags
$(inherited)
-framework
"CoreGraphics"
-framework
"Foundation"
-framework
"MobileCoreServices"
-framework
"Security"
-framework
"SystemConfiguration"
Sometimes, with the above Linker Flags, if I rerun pod install I get a bunch of arm64 errors which can only be solved by adding this to the linkers:
-l"Pods-Buyer-AFNetworking"
-l"Pods-Buyer-Stripe"
-l"Pods-Buyer-RKNotificationHub"
-l"Pods-Buyer-RKDropdownAlert"
-l"Pods-Buyer-SVProgressHUD"
I've also tried combinations of adding/removing this from the Linker Flags:
-ObjC
-lc++
-all_load
And finally, here's my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
target 'Buyer' do
pod 'AFNetworking', '2.2.1'
pod 'Stripe'
# pod 'PaymentKit'
pod 'RKNotificationHub'
pod 'RKDropdownAlert'
pod 'SVProgressHUD'
# pod 'Reveal-iOS-SDK', :configurations => ['Debug']
end
target 'BuyerTests' do
end
I've also followed all of the steps on the CocoaPods Guides Troubleshooting page (specifically 'Using the CocoaPods Project' > Step 4). That didn't change anything.
Is there anything I'm missing? This is driving me crazy... I'm at wits end. Any advice or things I'm missing would be really appreciated! (Oh and I'm running the latest Xcode version)
Thank you all in advanced!
Related
I updated pods for SalesforceSDKCore 4.3.1 and SalesforceRESTApi 4.3.1. When I did pod install it in turn installed cocoaLumberjack library which is a dependent library I suppose. After successful install of Pods, I couldn't build successfully, as I am getting this error -
ld: library not found for -lCocoaLumberjack
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I deleted my Library search paths, added/deleted inerited in Other linker Flags, nothing seem to work. These are my search path and other linker flag settings.
My Pod file -
# platform :ios, '8.0'
target 'Custom' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for Custom
source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
pod 'SalesforceSDKCore'
pod 'XMLDictionary', '~> 1.4'
pod 'SalesforceNetwork'
pod 'SmartStore'
pod 'SmartSync'
end
I had the same problem. I tried many solutions, some of them are:
File/Workspace Settings/Derived Data Arrow -> Delete DerivedData folder, empty trash
Terminal -> pod deintegrate , pod install
If you renamed your target's name, then:
Target/Build Settings/Test Host :: $(BUILT_PRODUCTS_DIR)/TargetName.app/TargetName
I really hate this linker command failed problem. I get it all the time and every time I need to follow another solution to solve this. I must have given over 30 hours of my life to this s#$t.
When you build the project with
pod 'Google/SignIn'
pod 'GooglePlayGames'
It gets error.
Undefined symbols for architecture armv7:
"_GTMMethodCheckMethodChecker", referenced from:
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString32] in GTMNSDictionary+URLArguments.o
+[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString33] in GTMNSDictionary+URLArguments.o
ld: symbol(s) not found for architecture armv7 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
I uploaded this problem on the GTM's issue page and PlayGameService's issue page, It seems GPG isn't currently maintained.
perotinus, the developer of GTM said
GooglePlusOpenSource pod that it depends on. My guess is that the GooglePlusOpenSource pod has a precompiled version of GTM that doesn't have its symbols renamed, and the linker gets confused when it sees that in the set of libraries that it should use when trying to link the GTM pod.
Is there any possible idea to use it? I don't see downgrade is not the good option.
I got the same error for installation of pod Firebase/Auth and I install older version of GoogleToolboxForMac above Firebase/Auth that is pod 'GoogleToolboxForMac', '2.0.0'.After that firebase with compatible version of GoogleToolboxForMac start to install.On your podfile remove pod 'Google/SignIn' and pod 'GooglePlayGames'. Paste pod of older version of GoogleToolboxForMac just above pod 'Google/SignIn' and pod 'GooglePlayGames' and install it again.
pod 'GoogleToolboxForMac', '2.0.0'
pod 'Google/SignIn'
pod 'GooglePlayGames'
ld: framework not found QorumLogs for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm getting this in my test files which used to work for months now. This is my header in the file:
import XCTest
import QorumLogs
#testable import MyAppName
The only thing I've changed recently is, update cocoapods, (QorumLogs is a pod), then installed Smooch.io pod, then for the first time added objective-c bridging header, created some Obj-C files and imported smooch.io framework.
Using Xcode 7.3, what can be the problem?
In your podfile, you should include the framework thats causing problems inside the AppTests as well.
target 'MyApp' do
pod 'FBSDKCoreKit'
end
target 'MyAppTests' do
pod 'FBSDKCoreKit'
end
After this:
Clean
Delete Derived Data
It's possible use this library with pod install?
My project already uses pod install and when I add this library, crash with:
"(UIImageView+AFNetworking.o) ld: 76 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
VIMNetworking worked out its Cocoapods issues - see https://github.com/vimeo/VIMNetworking
The Podfile entries that worked for me were
pod 'VIMNetworking', '~>5.4.2'
pod 'VIMVideoPlayer', '~>5.4.2'
and deleting the line for AFNetworking since the VIMNetworking pulls AFNetworking in as a dependecy.
My project start with cocos2d v3 and run smooth. However, when I add AFNetworking to my project,
the problem
"ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)" happen.
I used pod install and pod file is
platform :ios, ‘7.0’
pod 'AFNetworking', '~> 2.0'
during the installing, below messages show out
[!] The abc [Debug] target overrides the HEADER_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
[!] The abc [Release] target overrides the HEADER_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
so I go to project->target->build setting-> header search paths and put $(inherited) inside, then it can install success.
However, the cocos2d library wasn't call. So I go to Pods.debug.xcconfig and Pods.release.xcconfig to add
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/kazmath/include" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/Chipmunk/chipmunk/include" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/Chipmunk/objectivec/include"
finally the problem "ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)" still happen.
Are the above steps not correct? Or is there any other way to add cocos2d and AFNetworking together? Thank you.