Ad

Flutter Ios Pod Install Changes Deployment Target

- 1 answer

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?

Ad

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
Ad
source: stackoverflow.com
Ad