update ios
This commit is contained in:
30
ios/Podfile
30
ios/Podfile
@@ -37,12 +37,36 @@ target 'Runner' do
|
||||
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|
|
||||
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
|
||||
# end
|
||||
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
|
||||
$iOSVersion = '12.1' # or newer version
|
||||
|
||||
post_install do |installer|
|
||||
# add these lines:
|
||||
installer.pods_project.build_configurations.each do |config|
|
||||
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
|
||||
end
|
||||
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
|
||||
# add these lines:
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
|
||||
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user