post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 10.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
end
**注:**如果您的podfile中有以下代码,请将其替换为以上代码。
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
end
7条答案
按热度按时间ukqbszuj1#
这里有一个简短的解决方案!只需将代码片段复制并粘贴到Podfile的末尾,然后运行pod install命令。
在这种情况下,12.0是AppStore提交的最低支持iOS版本。您可以根据项目要求更改此版本。
u2nhd7ah2#
这是一个目标在你的可可豆荚上的问题。对我来说,答案是把下面的代码放在你的豆荚文件的结尾:
它解决了我所有的问题,编译和存档的项目。
另一种方法是更改pod项目中的
IPHONEOS_DEPLOYMENT_TARGET
,如下图所示:此致。
0dxa2lsx3#
更新:要解决此问题,您只需将
Deployment Target
更新为9.0
。更新方法是打开.xcworkspace
文件,选择Xcode上的Pods.xcodeproj
,然后将iOS Deployment Target
更新为9.0
或更高版本,如下图所示。另一个简单的修复方法是将以下代码添加到您的
Podfile
中,并在终端上的目录中运行pod install
。Previous:除非导入支持文件,否则您无法在
Xcode 12
上为iOS 8.0
提供支持。要默认提供支持,您必须使用Xcode 11
。最好检查在iOS 8
上使用您的应用的用户数量,并将最低支持版本更新为iOS 9
或更高版本。3qpi33ja4#
Flutter现在需要一条额外的生产线,以便在2021年底之前工作。
将下面更新的代码片段粘贴到Podfile的末尾,然后运行pod install命令。
**注:**如果您的podfile中有以下代码,请将其替换为以上代码。
r1zk6ea15#
这是因为Xcode 12中已不再支持iOS 8,但违规Pod的最低 * 部署 * 目标仍然是iOS 8。这在Xcode 12 release notes中有记录:
过时
解决方法。您可以将以下内容附加到您的
Podfile
中作为暂时的解决方法(然后照常运行pod install
):这将从所有使用iOS 8或更低版本的单元中移除部署目标设置,允许它们简单地继承您在
Podfile
顶部指定的项目部署目标。例如:kkbh8khc6#
我还需要加上
我的**.podspec**文件,以及上述(或以下)答案中的post_install脚本。
注:S.平台为
tquggr8v7#
我使用Flutter,因此我的步骤:
1.删除Podfile.lock文件
1.更改为平台:ios,“10.0”
1.删除ios文件夹中的Pod文件夹
1.后藤终端和Pod安装所有内容