apache / cordova-ios

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

Problems with 'cordova platform add ios` – needs updating according to new apple standards #1448

Closed geoidesic closed 3 weeks ago

geoidesic commented 1 month ago

Bug Report

Problem

Apple has updated minimum build version. As well as various schema changes

What is expected to happen?

What does actually happen?

Build succeeds with warnings, warnings which will prevent the app from being shippable.

Information

I suggest:

Screenshot 2024-07-18 at 12 00 31 Screenshot 2024-07-18 at 12 00 03

Command or Code

git clone git@github.com:your-account/cordova-test.git
cordova create cordovatest uk.co.domain.test cordova-test
mv -R cordovatest/ Cordova-test
cd cordova-test
git add *
git commit -m "initial commit"
git push
cordova platform add ios
cordova Build ios

That should allow you to see the errors. Then open the project in Xcode, click the warning icon and accept changes, change the build targets to the new minimum of 12, Then:

git diff

Which should show you what's changed in terms of apple's minimum build requirements.

Environment, Platform, Device

iOS on a GitHub macOS-latest runner and also iOS on my local Mac osx environment

Version information

Mac OS X 14.5 (23F79) Xcode Version 15.4 (15F31d) cordova 12.0.0 (cordova-lib@12.0.1) ios-deploy@1.12.2

Checklist

dpogue commented 1 month ago

Build succeeds with warnings, warnings which will prevent the app from being shippable.

It is only a warning, it does not impact the ability to submit the application to the App Store.

geoidesic commented 1 month ago

It is only a warning, it does not impact the ability to submit the application to the App Store.

My experience was that in the Github Action's runner, this would cause an error and exit for the workflow.

breautek commented 1 month ago

Warnings isn't the cause of a non-zero exit code (which will trigger error routine), which can be observed by our CI: https://github.com/apache/cordova-ios/actions/workflows/ci.yml

It is possible that an actual error is buried in your build output somewhere. xcodebuild (like most other c compilers) does not stop when an error occurs, it will proceed to build every object file, and print information on the status of each compilation unit and then return an error code at the end.

In other words if the project has 1,000 source files and source file 1 has a build error, it will print the error details then proceed to build the other 999 source files (also printing information, burying the error). In this hypothetical scenario, the error would be relatively near the top, but of course in a real scenario errors could be anywhere in the build output.

Hope this helps.