qt5base-lts/tests/manual/ios_assets/ios_assets.pro
Alexandru Croitor bf2587d9e5 CMake: Update the ios assets manual test
- provide an asset catalog .json file for both Xcode 13 and 14
  formats. Apps built against the Xcode 13 SDK are not validated
  anymore by the App store, but it's still useful to see how things
  were before.

- Xcode 13 required the following icon sizes for a universal iOS app:
   60x60@2x, 76x76@2x\~ipad, 167x167, 1024x1024

- Xcode 14 only needs the 1024x1024 one

- icons need to be embedded into the asset catalog starting with iOS
  11 according to Apple docs (not sure which Xcode version, but it's
  needed for both Xcode 13 and Xcode 14), and they don't have to
  manually be copied into the bundle anymore, Xcode takes care of
  that when processing the asset catalog

- add an 167x167 icon image for the iPad pro for Xcode 13

- add an 1024x1024 icon image that is required for successful app store
  submission and embed it into the asset catalogs

- for Xcode 13, we need to manually specify all the required icon
  sizes

- for Xcode 14 we can rely on Xcode to generate the smaller icons from
  the big one

- because the icons need to live in the asset catalog folder, remove
  unnecessary icons in the appicons folder.

- for the cmake project, make sure the asset catalog compiler generates
  the icons by setting the
  XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME attribute
  qmake does automatically already.
  it would be nice if we can do that automatically in a future Qt
  version

- remove unused icon references in Info.plist file with Xcode 13

- remove all icon references in Info.plist with Xcode 14, rely on Xcode
  to add that info via its generated partial Info.plist file that gets
  merged into the main one.

- don't include CMakeLists.txt as a text resource

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I0bc556e66647a66bc21402ea62db3374d0970e97
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-22 20:40:36 +02:00

53 lines
1.5 KiB
Prolog

TEMPLATE = app
SOURCES += main.cpp
QT += core gui testlib
CONFIG += app_bundle
TARGET = tst_manual_ios_assets
# Custom Info.plist
ios {
versionAtLeast(QMAKE_XCODE_VERSION, 14.0) {
plist_path = Info.ios.qmake.xcode.14.3.plist
} else {
plist_path = Info.ios.qmake.xcode.13.0.plist
}
QMAKE_INFO_PLIST = $$plist_path
}
# Custom resources
textFiles.files = $$files(*.txt)
# On iOS no 'Resources' prefix is needed because iOS app bundles are shallow,
# so the final location of the text file will be
# tst_manual_ios_assets.app/textFiles/foo.txt
# Specifying a Resources prefix actually causes code signing error for some reason.
# On macOS the location will be
# tst_manual_ios_assets.app/Contents/Resources/textFiles/foo.txt
ios {
textFiles.path = textFiles
}
macos {
textFiles.path = Contents/Resources/textFiles
}
textFiles.files -= CMakeLists.txt
QMAKE_BUNDLE_DATA += textFiles
# Asset catalog with images and app icons
ios {
# The asset catalog needs to have at least an empty AppIcon.appiconset, otherwise Xcode refuses
# to compile the asset catalog.
versionAtLeast(QMAKE_XCODE_VERSION, 14.0) {
QMAKE_ASSET_CATALOGS += AssetsXcode14.3.xcassets
} else {
QMAKE_ASSET_CATALOGS += AssetsXcode13.0.xcassets
}
SOURCES += utils.mm
LIBS += -framework UIKit
}
# Set custom launch screen
ios {
# Underneath, this uses QMAKE_BUNDLE_DATA, prevents the default launch screen from being set
# and bundles the custom one.
QMAKE_IOS_LAUNCH_SCREEN = $$PWD/CustomLaunchScreen.storyboard
}