Setting up Google SSO with Podfile in Swift - ios

I am trying to set up Google SSO.
My Podfile looks like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Recreation-iOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Google SSO
pod 'GoogleSignIn'
# Pods for Recreation-iOS
target 'Recreation-iOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'Recreation-iOSUITests' do
# Pods for testing
end
end
Then in Terminal I ran pod install from inside the repo, but I get an error when I run it:
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+missing+compatible+arch+in+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- missing compatible arch in ...
https://github.com/CocoaPods/CocoaPods/issues/10541 [open] [3 comments]
4 weeks ago
- I got error when doing pod install, something to do with M1 chip
https://github.com/CocoaPods/CocoaPods/issues/10569 [open] [2 comments]
a week ago
- CocoaPods compatibility with Apple DTK (Apple Silicon)
https://github.com/CocoaPods/CocoaPods/issues/9907 [open] [105 comments]
a day ago
and 3 more at:
https://github.com/cocoapods/cocoapods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle%2C%200x0009%29%3A%20missing%20compatible%20arch%20in%20%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle%20-%20%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle&type=Issues&utf8=✓
[!] Automatically assigning platform `iOS` with version `14.0` on target `Recreation-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`
This error message is not descriptive, so I don't know where to go from here.
--
EDIT: I tried the suggestion below and it seemed to work, but I still cannot get it to compile. Am getting this error now:
linker command failed with exit code 1 (use -v to see invocation)
----------------------------------------
SchemeBuildError: Failed to build the scheme "Recreation-iOS"
linker command failed with exit code 1 (use -v to see invocation)
Build target Recreation-iOS:
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Recreation-iOS editor. (in target 'Recreation-iOS' from project 'Recreation-iOS')
Link Recreation-iOS (arm64):
ld: warning: directory not found for option '-F/Users/mycomputer/Library/Developer/Xcode/DerivedData/Recreation-iOS-dkyyujebjzhwjjayuxvhtjejkuie/Build/Intermediates.noindex/Previews/Recreation-iOS/Products/Debug-iphonesimulator/AppAuth'
ld: warning: directory not found for option '-F/Users/mycomputer/Library/Developer/Xcode/DerivedData/Recreation-iOS-dkyyujebjzhwjjayuxvhtjejkuie/Build/Intermediates.noindex/Previews/Recreation-iOS/Products/Debug-iphonesimulator/GTMAppAuth'
ld: warning: directory not found for option '-F/Users/mycomputer/Library/Developer/Xcode/DerivedData/Recreation-iOS-dkyyujebjzhwjjayuxvhtjejkuie/Build/Intermediates.noindex/Previews/Recreation-iOS/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: framework not found AppAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run custom shell script '[CP] Embed Pods Frameworks':
mkdir -p /Users/mycomputer/Library/Developer/Xcode/DerivedData/Recreation-iOS-dkyyujebjzhwjjayuxvhtjejkuie/Build/Intermediates.noindex/Previews/Recreation-iOS/Products/Debug-iphonesimulator/Recreation-iOS.app/Frameworks
/Users/mycomputer/Documents/Git/Recreation-iOS/Pods/Target Support Files/Pods-Recreation-iOS/Pods-Recreation-iOS-frameworks.sh: line 42: source: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code

There's a link in the 3rd line of the error message. Following it led to a page with the search string:
dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
Googling "missing compatible arch" and "2.6.0" led me to this answer (https://github.com/CocoaPods/CocoaPods/issues/10220#issuecomment-730963835):
sudo arch -x86_64 gem install ffi
Then
arch -x86_64 pod install

Related

ld: library not found for -lCocoaLumberjack

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.

VIMNetworking with pod install error

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.

how to add cocos2d together with AFNetworking in Xcode

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.

library not found for -lPods-Doppio-Mantle

when build project,show this error,nothing to add in link binary with libraries,i don't know the reason
library not found for -lPods-Doppio-Mantle
I guess you were meaning after you install pod you have an error like that:
ld: library not found for -lPods-Doppio
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did you open the xworkspace that Cocoapods created, instead of xcodeproj?
Or check if you install pod in the right directory. I mean in the directory of your Project:
cd myProject
pod install

Install WeChat via cocoapods issue

I found WeChatSDK 0.0.1 on CocoaPods
I have added pod 'WeChatSDK', '~> 0.0.1' to my Podfile,
butI got this error after run project:
ld: warning: directory not found for option '-L/Users/mac/Documents/Projects/Project-iOS/Pods/WeChatSDK/WeChat_SDK_iOSen'
ld: library not found for -lWeChatSDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've updated the WeChatSDK Spec here to use some newer hooks. This will hopefully fix your issue. Otherwise you should submit a new issue on our issue tracker with things like this.

Resources