apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.0.99 #1386

Closed alexp25 closed 5 months ago

alexp25 commented 5 months ago

Bug Report

Problem

After upgrading to cordova-ios@7 I get the following warning (which seems to break the build)

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.0.99 (in target 'FirebaseCore' from project 'Pods')

What is expected to happen?

The cordova build should override IPHONEOS_DEPLOYMENT_TARGET based on the specified deployment-target

What does actually happen?

The build fails with error code 65

Information

I looked into the generated Podfile and found out that it was missing the previously built-in fix mentioned here: https://developer.apple.com/forums/thread/656616

It was working with cordova-ios@6 using these preferences in the config.xml

<preference name="pods_ios_min_version" value="12.0" />
<preference name="deployment-target" value="12.0" />
<preference name="pods_use_frameworks" value="true" />

I tried to add this manually:

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
  end
 end
end

..but it gets overwritten every time I run cordova build

Command or Code

cordova build

Environment, Platform, Device

macOS Sonoma cordova-ios@7.0.1 cordova@12.0.0 XCode 15.0.1

Version information

Checklist

breautek commented 5 months ago

pods_ios_min_version and pods_use_frameworks are not preferences that Cordova reads, though it's possible that a third-party framework uses them.

deployment-target is used, but it will only change the target for the app project, not the CordovaLib project.

Closing as duplicate of: https://github.com/apache/cordova-ios/issues/1379

Dkogan90 commented 5 months ago

Same issue here