Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Bump minimum deployment target to 12.0 #1323

Closed
wants to merge 1 commit into from

Conversation

breautek
Copy link
Contributor

@breautek breautek commented May 3, 2023

Platforms affected

iOS

Motivation and Context

Some features are being introduced (such as #1309) which requires iOS 12+

Description

Bump all occurrences IPHONEOS_DEPLOYMENT_TARGET to 12.0, including the app project template, CordovaLib, and test files.

Testing

Letting CI do the testing.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@breautek breautek added this to the 7.0.0 milestone May 3, 2023
@breautek
Copy link
Contributor Author

breautek commented May 3, 2023

Screenshot 2023-05-03 at 9 48 57 AM

@breautek breautek force-pushed the feat/bump-min-ios branch from 24bbb7b to 15145bf Compare May 3, 2023 13:13
@breautek breautek changed the title feat!: Bump minimum deployment target to 12.0 (WIP) feat!: Bump minimum deployment target to 12.0 May 3, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #1323 (15145bf) into master (1a5cd45) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1323   +/-   ##
=======================================
  Coverage   78.51%   78.51%           
=======================================
  Files          15       15           
  Lines        1778     1778           
=======================================
  Hits         1396     1396           
  Misses        382      382           
Impacted Files Coverage Δ
lib/Podfile.js 75.12% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@breautek breautek changed the title (WIP) feat!: Bump minimum deployment target to 12.0 feat!: Bump minimum deployment target to 12.0 May 3, 2023
@dpogue
Copy link
Member

dpogue commented May 3, 2023

Question: When we override the iOS deployment target via a preference, does that apply to just the app project or also to CordovaLib?

Essentially, if somebody wanted to provide all the old icon sizes using a hook or something, can they lower the deployment target back to 11 using config.xml, or will Xcode error because CordovaLib requires a higher version (even though there's not actually anything in CordovaLib that requires iOS 12)

@jcesarmobile
Copy link
Member

It's still not clear if we are going to merge #1309 since some people might want to keep using different icons for different devices or for push notifications.

We should have a more formal mail (or vote?) about bumping the deployment target.

@breautek
Copy link
Contributor Author

breautek commented May 3, 2023

It's still not clear if we are going to merge #1309 since some people might want to keep using different icons for different devices or for push notifications.

We should have a more formal mail (or vote?) about bumping the deployment target.

I had the same thought and a discuss thread should be arriving shortly. Will post link once it appears in ponymail.

Mail Thread: https://lists.apache.org/thread/mvj3lj5bol89j6d2y74bt948xktb0lvv

@erisu
Copy link
Member

erisu commented May 7, 2023

Can it be confirmed if CordovaLib can stay at 11.0, but only bump the project template to 12.0?

Maybe the project template could be increased to support new features (one-icon), but allowing anyone else who use only the CordovaLib in their non-Cordova project to continue to support iOS 11.

@breautek
Copy link
Contributor Author

Can it be confirmed if CordovaLib can stay at 11.0, but only bump the project template to 12.0?

Maybe the project template could be increased to support new features (one-icon), but allowing anyone else who use only the CordovaLib in their non-Cordova project to continue to support iOS 11.

I didn't test via code change, but setting the deployment targets manually in xcode will still allows us to build as long as the App target is >= the deployment target of CordovaLib target.

The bigger concern is how XCode behaves if you attempt to configure a target to a version that it no longer supports (and is not selectable via the UI). To test this, I installed cordova-ios@5 platform which tries to set the deployment target to 10.0.

The observed behaviour is in the XCode UI, under the App target, you see Deployment Target 10 (when it's normally not selectable in the dropdown menu). Under the CordovaLib target, the target is set to default

Screenshot 2023-05-13 at 9 02 41 AM

When attempting to build this project, the following errors are produced:

note: Building targets in dependency order
/Users/norman/development/cordova/test/iostest/platforms/ios/CordovaLib/CordovaLib.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'CordovaLib' from project 'CordovaLib')
/Users/norman/development/cordova/test/iostest/platforms/ios/HelloCordova.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'HelloCordova' from project 'HelloCordova')
/Users/norman/development/cordova/test/iostest/platforms/ios/HelloCordova.xcodeproj: error: Signing for "HelloCordova" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'HelloCordova' from project 'HelloCordova')
warning: Run script build phase 'Copy www directory' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'HelloCordova' from project 'HelloCordova')
** ARCHIVE FAILED **

So there are two parts:

/Users/norman/development/cordova/test/iostest/platforms/ios/CordovaLib/CordovaLib.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'CordovaLib' from project 'CordovaLib')

Shows that despite the UI, CordovaLib is being attempted to built with a deployment target of 10.0, as expected for Cordova-ios@5, but XCode 14.3 is refusing to build it since it can only build deployment targets 11+

Likewise, the same erroris also reproduced for the app target:

/Users/norman/development/cordova/test/iostest/platforms/ios/HelloCordova.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'HelloCordova' from project 'HelloCordova')

This is further reinforced by their documentation for minimum SDK and requirements:

image

So based on this current behaviour there is a chance that XCode 15 will drop support for iOS 11. If that happens and if we aren't proactive on it, then we may need to make another major release to drop support for iOS 11 at that time. I don't think we have any particular deadlines to meet so we can wait to see what XCode 15 will support when it's beta comes out.

@dpogue
Copy link
Member

dpogue commented May 13, 2023

I don't think we have any particular deadlines to meet so we can wait to see what XCode 15 will support when it's beta comes out.

WWDC is June 5th, so we should be able to find out fairly soon.

@dpogue
Copy link
Member

dpogue commented Jun 6, 2023

Testing with Xcode 15 beta reveals that it has iOS 12 as the minimum supported SDK, and produces a warning (for each project) if the target version is lower. But it builds and runs fine with no issues.

I don't think there's a way to get rid of that warning without bumping the version number, but there's also no specific need to bump it.

@jcesarmobile
Copy link
Member

One thing that was mentioned on the Android minSDK bump was the Chrome version. We bumped to minSDK 24 and was mentioned that the Chrome version included in the Android image was 52, so we would stick to Chrome's 52 features/support on the javascript side.
Any idea if iOS 11 WebView supports same features as Chrome 52?

In example the eslint changes from latest @cordova/eslint-config made the code of screen orientation plugin not compatible with old android versions just because it uses let/const instead of var.
That doesn't seem an issue on iOS 11, but not sure if other rule changes could be not compatible with iOS 11.

@breautek
Copy link
Contributor Author

breautek commented Jun 6, 2023

One thing that was mentioned on the Android minSDK bump was the Chrome version. We bumped to minSDK 24 and was mentioned that the Chrome version included in the Android image was 52, so we would stick to Chrome's 52 features/support on the javascript side. Any idea if iOS 11 WebView supports same features as Chrome 52?

In example the eslint changes from latest @cordova/eslint-config made the code of screen orientation plugin not compatible with old android versions just because it uses let/const instead of var. That doesn't seem an issue on iOS 11, but not sure if other rule changes could be not compatible with iOS 11.

It is good point,

ES6 (which includes stuff liek arrow functions, native promises, let/const, etc...) has good support since iOS 10, and since Chrome 51.

Specific ES6 features like let keyword may show slightly different compatibility, for example caniuse says it's only supported in iOS 11 (iOS 10 had a buggy version of it), and chrome supported it in Chrome 49, or 41 if strict mode was enabled.

But overall, ES6 features should be pretty safe to use without any external tools, even if we keep iOS 11 as our minimum requirement.

https://caniuse.com/?search=ES6

@breautek
Copy link
Contributor Author

breautek commented Jun 6, 2023

Sounds like we prefer to keep iOS 11 as the minimum target, so I'll close this.

@breautek breautek closed this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants