【发布时间】:2021-11-25 17:16:16
【问题描述】:
所以我从 GitHub 克隆了一个现有存储库,并在我的设备上尝试了 pod(MacBook Pro M1 2020 bigSur 11.6 和 Xcode 13)Cocoapods 没有按预期工作,所以我在网上查了一下,然后尝试使用 Rosetta 打开并安装ffi gem 我设法安装了大部分 pod。但是,这两个错误不断出现:
- 没有这样的模块“MapboxCommon_Private”
- 未能构建模块“MapboxSearch”;编译器不支持此 SDK(该 SDK 使用“Apple Swift 5.4.2 版(swiftlang-1205.0.28.2 clang-1205.0.19.57)”构建,而此编译器为“Apple Swift 5.5 版(swiftlang-1300.0.31.1 clang-1300.0.29.1)')。请选择与 SDK 匹配的工具链。
pod 文件如下所示:
platform :ios, '14.3'
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
config.build_settings['ARCHS[sdk=iphonesimulator*]'] = `uname -m`
end
end
end
target 'Project' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Proiect
pod 'RxSwift'
pod 'RxCocoa'
pod 'Moya/RxSwift'
pod 'XCoordinator', '~> 2.0'
pod 'Reusable', '~> 4.1.1'
pod 'SideMenu', '~> 6.0'
pod 'GoogleSignIn', '~> 5.0'
pod 'FacebookLogin'
pod 'FBSDKLoginKit'
pod 'NotificationBannerSwift'
pod 'Moya/RxSwift'
pod 'NVActivityIndicatorView', '~> 4.8.0'
pod 'CountryPickerView'
pod 'SwiftGen', '~> 6.0'
pod "RxGesture"
pod 'Mapbox-iOS-SDK', '~> 6.2.1'
pod 'XLPagerTabStrip', '~> 9.0'
pod 'DropDown'
pod "CenteredCollectionView"
pod 'RealmSwift'
pod "RxRealm"
pod 'MapboxSearch', ">= 1.0.0-beta.2", "< 2.0"
pod 'XLPagerTabStrip', '~> 9.0'
pod 'Wormholy', :configurations => ['dev debug', 'dev release']
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
pod 'JWTDecode', '~> 2.6'
pod 'CryptoSwift', '~> 1.4.0'
pod 'DPOTPView'
target 'Tests' do
inherit! :search_paths
# Pods for testing
end
target 'UITests' do
# Pods for testing
end
end
我还尝试将 Xcode 版本降级到 Xcode 12.5.1,但使用以下 pod 文件我又遇到了另一个错误:
- 无法从其模块接口构建模块“MapboxSearch”;它可能已损坏或在生成时触发了 Swift 编译器中的错误
pod 文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '14.3'
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
config.build_settings['ARCHS[sdk=iphonesimulator*]'] = `uname -m`
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
target 'Proiect' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Proiect
pod 'RxSwift'
pod 'RxCocoa'
pod 'Moya/RxSwift'
pod 'XCoordinator', '~> 2.0'
pod 'Reusable', '~> 4.1.1'
pod 'SideMenu', '~> 6.0'
pod 'GoogleSignIn', '~> 5.0'
pod 'FacebookLogin'
pod 'FBSDKLoginKit'
pod 'NotificationBannerSwift'
pod 'Moya/RxSwift'
pod 'NVActivityIndicatorView', '~> 4.8.0'
pod 'CountryPickerView'
pod 'SwiftGen', '~> 6.0'
pod "RxGesture"
pod 'Mapbox-iOS-SDK', '~> 6.4.0'
pod 'XLPagerTabStrip', '~> 9.0'
pod 'DropDown'
pod "CenteredCollectionView"
pod 'RealmSwift'
pod "RxRealm"
pod 'MapboxSearch', ">= 1.0.0-beta.6", "< 2.0"
pod 'XLPagerTabStrip', '~> 9.0'
pod 'Wormholy', :configurations => ['dev debug', 'dev release']
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
pod 'JWTDecode', '~> 2.6'
pod 'CryptoSwift', '~> 1.4.0'
pod 'DPOTPView'
target 'Tests' do
inherit! :search_paths
# Pods for testing
end
target 'UITests' do
# Pods for testing
end
end
【问题讨论】: