-
Notifications
You must be signed in to change notification settings - Fork 985
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!: Better Catalyst build support #1313
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1313 +/- ##
==========================================
+ Coverage 80.22% 81.56% +1.34%
==========================================
Files 16 16
Lines 1871 1888 +17
==========================================
+ Hits 1501 1540 +39
+ Misses 370 348 -22 ☔ View full report in Codecov by Sentry. |
`cordova build ios --device --target=mac ...` Output is to `build/Debug-maccatalyst`
Xcode warns that only one can be enabled at a time, so we need to pick one, and Catalyst seems like the better option for a proper macOS app experience.
If neither `--device` nor `--emulator` are specified for the build command, it will check for a connected device and assume `--device` if one is found. However, it was also checking for the availability of the ios-deploy tool which is used to deploy to a connected device. If we're just building, we don't need to check for a deploy tool. The run command already has this check to ensure that ios-deploy is available before actually trying to deploy. Closes apacheGH-420. Closes apacheGH-677.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested mobilespec on iOS and Catalyst builds.
Geolocation plugin might need additional investigation for Catalyst.
Looks like location access needs a capability to be turned on in the entitlements file for macOS/Catalyst. Once you do that, it works as expected. We can update the plugin to inject that. |
Platforms affected
iOS, macOS
Motivation and Context
With the deprecation of cordova-osx and the availability of Catalyst to deploy iOS apps on macOS as their own app bundles, we should support targeting Catalyst builds.
Closes #420.
Closes #677.
Closes #1274.
Closes #1417.
Description
After the work in #1310 caused the build output folder to be named based on the platform, I realized this actually solved one of the remaining questions around where to put Catalyst output files... now they end up in
build/Debug-maccatalyst
orbuild/Release-maccatalyst
We detect if we are building for Catalyst (as opposed to iOS Device vs iOS Simulator) by the
--target=mac
option.Testing
cordova build ios --target=mac
workscordova run ios --target=mac
worksChecklist