Flutter ios pod install changes deployment target

1.6k Views Asked by At

So i’m trying to build my Flutter application for ios and my minimum deployment target is ios 11 (because of some other plugins I use)

But pod install sets the target of DKPhotoGallery pods to ios 9 which fails the build, I can change it on Xcode manually to ios 11 and then I can build it successfully,

but since flutter run calls 'pod install' it changes it back to ios 9 and it fails, how can I solve this issue?

2

There are 2 best solutions below

2
On BEST ANSWER

Add this to the end of pod file

Please change the required IPHONEOS_DEPLOYMENT_TARGET

post_install do |pi|
    pi.pods_project.targets.each do |t|
        t.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        end
    end
end
3
On

You can change the platform to platform :ios, '11' in your Podfile, it's at the first line of your Podfile