Closed tiagoappereira closed 4 weeks ago
We have an existing target-device
preference that supports handset
, tablet
, and universal
as values, and sets the TARGETED_DEVICE_FAMILY
.
Maybe we can find a way to add this functionality to that existing preference?
We have an existing
target-device
preference that supportshandset
,tablet
, anduniversal
as values, and sets theTARGETED_DEVICE_FAMILY
.Maybe we can find a way to add this functionality to that existing preference?
If the idea is to expand the target-device
supported values, doing so would change what the preference represents. From the official documentation
This property maps directly to TARGETED_DEVICE_FAMILY in the xcode project.
which would no longer be true.
The documentation can be updated to reflect what the preference actually does, so I wouldn't worry too much about that aspect.
I don't have strong feelings about it, but I do wonder if it's easier or more consistent to have a single preference that controls the output platforms (similar to the 3 checkboxes in Xcode) vs a combination of multiple preferences that might interact in unusual ways.
My current thinking around this is to disable the iPad-on-macOS thing by default, and to allow explicitly building a macOS app from the same codebase targeting Catalyst. That means there would be an extra step for those who want to distribute a macOS app, but it should be a better result (in terms of user experience and platform fit) than the iPad-on-macOS option.
Xcode 14 considers that iOS apps should support by default not only iPhone and iPad, but also Mac (with Apple Silicon processors). With the introduction of “Designed for iPad“, IPAs can be installed on these devices, and Apple wants to make this the default behaviour/experience.
Also, when apps with the Mac target are submitted to the App Store they are available for Mac by default as well. They can be found in a specific “iPhone & iPad Apps“ tab.
Therefore, with the suggested preference in this PR, developers can disable the aforementioned default behaviour.
Description
To disable Mac target, the following lines need to be added to the .pbxproj:
SupportMac
:Testing
Created a local iOS Cordova project based on this cordova-ios branch and the .pbxproj was:
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)