我为我的 Flutter 应用程序运行
pod install
,我收到此错误:
[!] CocoaPods could not find compatible versions for pod "app_settings":
In Podfile:
app_settings (from `.symlinks/plugins/app_settings/ios`)
Specs satisfying the `app_settings (from `.symlinks/plugins/app_settings/ios`)` dependency were found, but they required a higher minimum deployment target.
Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.12.0`
cloud_firestore: Using user specified Firebase SDK version '10.12.0'
cloud_functions: Using user specified Firebase SDK version '10.12.0'
firebase_analytics: Using user specified Firebase SDK version '10.12.0'
firebase_auth: Using user specified Firebase SDK version '10.12.0'
firebase_core: Using user specified Firebase SDK version '10.12.0'
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring ffi-1.15.1 because its extensions are not built. Try: gem pristine ffi --version 1.15.1
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring nio4r-2.5.7 because its extensions are not built. Try: gem pristine nio4r --version 2.5.7
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using user specified Firebase SDK version '10.12.0'
firebase_dynamic_links: Using user specified Firebase SDK version '10.12.0'
firebase_messaging: Using user specified Firebase SDK version '10.12.0'
firebase_remote_config: Using user specified Firebase SDK version '10.12.0'
firebase_storage: Using user specified Firebase SDK version '10.12.0'
[!] CocoaPods could not find compatible versions for pod "app_settings":
In Podfile:
app_settings (from `.symlinks/plugins/app_settings/ios`)
Specs satisfying the `app_settings (from `.symlinks/plugins/app_settings/ios`)` dependency were found, but they required a higher minimum deployment target.
Podfile 版本:
platform :ios, '11.0'
Flutter 3.10.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f468f3366c (3 weeks ago) • 2023-07-12 15:19:05 -0700
Engine • revision cdbeda788a
Tools • Dart 3.0.6 • DevTools 2.23.1
我通过运行
flutter precache --ios
修复了它。
如果您检查 app_settings 的 pubspec,它会提到 15 是最小部署目标。所以我在我的 podfile 中将其更改为 15 并且它起作用了
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'app_settings'
s.version = '3.0.0+1'
s.summary = 'A Flutter plugin for opening iOS and Android phone settings from an app.'
s.description = 'A Flutter plugin for opening iOS and Android phone settings from an app.'
s.homepage = 'https://github.com/spencerccf/app_settings'
s.license = { :file => '../LICENSE' }
s.author = { '[email protected]' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.ios.deployment_target = '15.0'
s.swift_version = '5.0.1'
end