natintosh / intl_phone_number_input

MIT License
163 stars 490 forks source link

IOS error : Compiling for iOS 11.0, but module 'PhoneNumberKit' has a minimum deployment target of iOS 12.0: #415

Open bensonarafat opened 8 months ago

bensonarafat commented 8 months ago

Describe the bug If you are getting this error when using the package for IOS app. that Compiling for IOS 11.0 but module 'PhoneNumberKit' has a minimum deployment target of 12.0..

This is because intl_phone_number_input depends on plugin_libphonenumber

Issues have been raised about this error and a PR but this has not been merged.

So, my way around was to do a temporary fix by doing this on my ios/Podfile file

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
# START - Fix
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
# END - Fix
    end
  end
end

So this is my solution... OR i open a PR here.