Ios 在Swift中使用Podfile设置Google SSO
我正在尝试设置谷歌SSO 我的播客文件如下所示:Ios 在Swift中使用Podfile设置Google SSO,ios,swift,xcode,cocoapods,Ios,Swift,Xcode,Cocoapods,我正在尝试设置谷歌SSO 我的播客文件如下所示: # 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 Goo
# 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
然后在终端中,我从repo内部运行了pod install,但运行时出现了一个错误:
[!] 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`
这个错误消息不是描述性的,所以我不知道从这里到哪里去
--
编辑:我尝试了下面的建议,它似乎有效,但我仍然无法将其编译。我现在收到此错误:
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
错误消息的第三行有一个链接。在它之后,会出现一个带有搜索字符串的页面: dlopen(/Library/Ruby/Gems/2.6.0/Gems/ffi-1.15.0/lib/ffi_c.bundle,0x0009):在/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中缺少兼容的arch 通过谷歌搜索“missing compatible arch”和“2.6.0”,我找到了这个答案():
这能解决问题吗@jnpdx哇是的--谢谢--你是如何发现这是问题的?我编辑了我的原始帖子,因为我在运行这些命令后遇到了错误。我对你的原始问题有了答案,但现在它看起来是一个全新的问题。如果你愿意,我可以删除我的答案。不用担心——我接受了你的回答——对不起,我对斯威夫特完全陌生,所以我很难理解什么是相关的。我创建了一个新帖子:
sudo arch -x86_64 gem install ffi
Then
arch -x86_64 pod install