没有这样的模块 'MapboxCommon_Private' / MapboxSearch / 编译器不支持此 SDK
No such module 'MapboxCommon_Private' / MapboxSearch / this SDK is not supported by the compiler
所以我从 GitHub 克隆了一个现有存储库并在我的设备上尝试了 pods(MacBook Pro M1 2020 bigSur 11.6 和 Xcode 13)Cocoapods 是没有按预期工作,所以我在网上查找了它,在尝试使用 Rosetta 打开并安装 ffi gem 之后,我设法安装了大部分 pods。但是,这 2 个错误不断出现:
- 没有这样的模块'MapboxCommon_Private'
- 构建模块失败'MapboxSearch';编译器不支持此 SDK(SDK 是使用 'Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)' 构建的,而此编译器是 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)')。请select一个匹配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
原来是这个 pod 导致了问题:
pod 'MapboxSearch', ">= 1.0.0-beta.6", "< 2.0"
所以我将其替换为:
pod 'MapboxSearch', "1.0.0-beta.4"
(Xcode 和航站楼 运行 Rosetta)
所以我从 GitHub 克隆了一个现有存储库并在我的设备上尝试了 pods(MacBook Pro M1 2020 bigSur 11.6 和 Xcode 13)Cocoapods 是没有按预期工作,所以我在网上查找了它,在尝试使用 Rosetta 打开并安装 ffi gem 之后,我设法安装了大部分 pods。但是,这 2 个错误不断出现:
- 没有这样的模块'MapboxCommon_Private'
- 构建模块失败'MapboxSearch';编译器不支持此 SDK(SDK 是使用 'Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)' 构建的,而此编译器是 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)')。请select一个匹配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
原来是这个 pod 导致了问题:
pod 'MapboxSearch', ">= 1.0.0-beta.6", "< 2.0"
所以我将其替换为:
pod 'MapboxSearch', "1.0.0-beta.4"
(Xcode 和航站楼 运行 Rosetta)