Xcode: Update project format compatibility level
When MACOSX_BUNDLE TRUE
, CMake generates an Xcode project.
Opening this in Xcode reveals that the project format is "Xcode 3.2-compatible". This is 9 versions behind the current "Xcode 14.0-compatible".
The problems with using such an old format are:
- The General tab does not get populated.
- This causes a problem accepting the icon and requires an (undocumented) extra step to manually set the App Icon.
- It is not possible to specify supported destinations (e.g. iPhone, iPad, etc.)
- Within the Build Settings tab, the Packaging section does not get fully populated
- This results in the warning "User-supplied CFBundleIdentifier 'my.identifier.from.info.plist' in the Info.plist must be the same as the PRODUCT_BUNDLE_IDENTIFIER build setting value ''."
- Within the Build Phases tab, asset catalogs don't get added to the Copy Bundle Resources section.
- This causes a problem accepting the assets, e.g. the app icon and requires an (undocumented) extra step to manually set the App Icon.
In addition,
- Apple documentation https://help.apple.com/xcode/mac/current/#/dev10510b1f7 it says "For iOS 11.0 apps and later, the app icon is required to be in an asset catalog." It would be helpful if CMake could provide a way to specify an asset catalog by its folder
MyAssetName.xcassets
and have the whole asset copied into the target Resource folder retaining its internal folder structure.
I have looked at this just from the perspective of building iOS apps. Maybe there are other impacts for MacOS, TVOS, WatchOS apps.
This issue is related to the need to update the Info.plist handling: #24169