[iOS] Appstore trouble with CFBundleIconName and asset catalog - something to do with xcode 14.1 and iOS 16.1 SDK
-
Hi,
I developed a Routing Map ( using Arcgis Runtime sdk for QT ) application in Qt (5.15.2 for iOS) for iOS devices on a MacBook computer. I am getting an error while uploading the Qt application after product with archive in Xcode to Apple Sore.
I don't have any problems with the Xcode 14.1 (Code Signing Identity : Apple Distribution : My Development Team, Code Signing Style : Manual, Provisioning profile : Compatible with the team) part, but can you help me solve the error that I think is related to the Qt application icons or icons files?
If this doesn't solve the problem, the app won't be uploaded to the app store, can you help?
Here is error picure below:
XCode Deployment Infor and App Icons and Launch Screen picture below:
Here is also QT İOS folder structure and files :
Info.plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>My App Name</string>
<key>CFBundleExecutable</key>
<string>My App Name</string>
<key>CFBundleGetInfoString</key>
<string>ArcGIS</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon_29.png</string>
<string>Icon_40.png</string>
<string>Icon_50.png</string>
<string>Icon_57.png</string>
<string>Icon_58.png</string>
<string>Icon_72.png</string>
<string>Icon_76.png</string>
<string>Icon_80.png</string>
<string>Icon_100.png</string>
<string>Icon_114.png</string>
<string>Icon_120.png</string>
<string>Icon_144.png</string>
<string>Icon_152.png</string></array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon_29.png</string>
<string>Icon_40.png</string>
<string>Icon_50.png</string>
<string>Icon_57.png</string>
<string>Icon_58.png</string>
<string>Icon_72.png</string>
<string>Icon_76.png</string>
<string>Icon_80.png</string>
<string>Icon_100.png</string>
<string>Icon_114.png</string>
<string>Icon_120.png</string>
<string>Icon_144.png</string>
<string>Icon_152.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NOTE</key>
<string>Built with ArcGIS Runtime SDK for Qt.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string></string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string></string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiresPersistentWiFi</key>
<string>NO</string>
<key>UIStatusBarStyle</key>
<string></string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>Contents.js file :
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon_29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon_58.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon_80.png",
"scale" : "2x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon_57.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon_114.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon_120.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon_29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon_58.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon_40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon_80.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon_50.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon_100.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon_72.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon_144.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon_76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon_152.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}iOS.pri file :
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWDios_icon.files = $$files($$PWD/Images.xcassets/AppIcon.appiconset/Icon_*.png)
QMAKE_BUNDLE_DATA += ios_iconOTHER_FILES += $$PWD/Info.plist $$PWD/Images.xcassets/AppIcon.appiconset/Contents.json
QMAKE_INFO_PLIST = $$PWD/Info.plist
My App.pro file:
mac {
cache()
}#-------------------------------------------------------------------------------
CONFIG += c++14
ANDROID_MIN_SDK_VERSION = 21
ANDROID_TARGET_SDK_VERSION = 30#--additional modules are pulled in via arcgisruntime.pri
QT += qml quickARCGIS_RUNTIME_VERSION = 100.14.1
include($$PWD/arcgisruntime.pri)TEMPLATE = app
TARGET = My App Nameequals(QT_MAJOR_VERSION, 5) {
lessThan(QT_MINOR_VERSION, 15) {
error("$$TARGET requires Qt 5.15.2")
}
equals(QT_MINOR_VERSION, 15) : lessThan(QT_PATCH_VERSION, 2) {
error("$$TARGET requires Qt 5.15.2")
}
}#-------------------------------------------------------------------------------
SOURCES +=
main.cppRESOURCES +=
qml/qml.qrc
Resources/Resources.qrcOTHER_FILES +=
wizard.xml
wizard.png#-------------------------------------------------------------------------------
win32 {
include (Win/Win.pri)
}macx {
include (Mac/Mac.pri)
}ios {
include (iOS/iOS.pri)
}android {
include (Android/Android.pri)
}android: include(C:/Users/user/AppData/Local/Android/Sdk/tools/android_openssl/openssl.pri)
DISTFILES +=
Android/AndroidManifest.xml
Android/build.gradle
Android/gradle.properties
Android/gradle/wrapper/gradle-wrapper.jar
Android/gradle/wrapper/gradle-wrapper.properties
Android/gradlew
Android/gradlew.bat
Android/res/values/libs.xml
Android/res/values/strings.xml -
Hi SGaist,
I added it to the Info.plist file as follows:
<key>CFBoundleIconName</key>
<string>AppIcon</string>
Do we need to write "AppIcon" in the red square in the Picture below?
In the Icon part, I added a 120x120 pixel file named "Icon_120x120.png" (with bold font in Info.plist file ) for iphone and called it in the "Info.plist" and "Contents.json" file as follows.
Info.plist file:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon_29.png</string>
<string>Icon_40.png</string>
<string>Icon_50.png</string>
<string>Icon_57.png</string>
<string>Icon_58.png</string>
<string>Icon_72.png</string>
<string>Icon_76.png</string>
<string>Icon_80.png</string>
<string>Icon_100.png</string>
<string>Icon_114.png</string>
<string>Icon_120.png</string>
<string>Icon_120x120.png</string>
<string>Icon_144.png</string>
<string>Icon_152.png</string></array>
</dict>
</dict>I didn't know if the <key>CFBundle Icons</key> and <key>CFBundle Icons~ipad</key> sections and the icon names in it should be included in the Info.plist file or should I delete it?Because they suggested deleting it from the Info.plist file below in a document.
<key>CFBundleIconFile</key>
<key>CFBundleIcons</key>Contents.json file
{
"size" : "120x120",
"idiom" : "iphone",
"filename" : "Icon_120x120.png",
"scale" : "2x"
}
The following mandatory ios-marketing icon has also been added to the Contents.json file:{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon_App-1024x1024@1x.png",
"scale" : "1x"
}Even though I edited the above parts, I still get the same error. Am I missing something somewhere, can you help?
Finally, shall we add or delete lines of code from the iOS.pri or MyProject.pro files? as follows:
QMAKE_ASSET_CATALOGS = $$PWD/ios/Images.xcassets
QMAKE_ASSET_CATALOGS_APP_ICON = “AppIcon”@tkoka I never have icon names in my info.plist
this information is part of my .proios { QMAKE_INFO_PLIST = ios/Info.plist QMAKE_ASSET_CATALOGS = $$PWD/ios/Images.xcassets QMAKE_ASSET_CATALOGS_APP_ICON = "AppIcon" ios_artwork.files = $$files($$PWD/ios/iTunesArtwork*.png) QMAKE_BUNDLE_DATA += ios_artwork app_launch_screen.files = $$files($$PWD/ios/MyLaunchScreen.storyboard) QMAKE_BUNDLE_DATA += app_launch_screen QMAKE_IOS_DEPLOYMENT_TARGET = 12.0 QMAKE_TARGET_BUNDLE_PREFIX = org.blabla QMAKE_BUNDLE = myapp # Note for devices: 1=iPhone, 2=iPad, 1,2=Universal. QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2 }
and this is my project structure:
-
Hi,
From the looks of it, your
Info.plist
file does not contain that entry so you should add it.As for the icon, do you have one of the requested size ?
-
Hi SGaist,
I added it to the Info.plist file as follows:
<key>CFBoundleIconName</key>
<string>AppIcon</string>
Do we need to write "AppIcon" in the red square in the Picture below?
In the Icon part, I added a 120x120 pixel file named "Icon_120x120.png" (with bold font in Info.plist file ) for iphone and called it in the "Info.plist" and "Contents.json" file as follows.
Info.plist file:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon_29.png</string>
<string>Icon_40.png</string>
<string>Icon_50.png</string>
<string>Icon_57.png</string>
<string>Icon_58.png</string>
<string>Icon_72.png</string>
<string>Icon_76.png</string>
<string>Icon_80.png</string>
<string>Icon_100.png</string>
<string>Icon_114.png</string>
<string>Icon_120.png</string>
<string>Icon_120x120.png</string>
<string>Icon_144.png</string>
<string>Icon_152.png</string></array>
</dict>
</dict>I didn't know if the <key>CFBundle Icons</key> and <key>CFBundle Icons~ipad</key> sections and the icon names in it should be included in the Info.plist file or should I delete it?Because they suggested deleting it from the Info.plist file below in a document.
<key>CFBundleIconFile</key>
<key>CFBundleIcons</key>Contents.json file
{
"size" : "120x120",
"idiom" : "iphone",
"filename" : "Icon_120x120.png",
"scale" : "2x"
}
The following mandatory ios-marketing icon has also been added to the Contents.json file:{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon_App-1024x1024@1x.png",
"scale" : "1x"
}Even though I edited the above parts, I still get the same error. Am I missing something somewhere, can you help?
Finally, shall we add or delete lines of code from the iOS.pri or MyProject.pro files? as follows:
QMAKE_ASSET_CATALOGS = $$PWD/ios/Images.xcassets
QMAKE_ASSET_CATALOGS_APP_ICON = “AppIcon” -
Hi SGaist,
I added it to the Info.plist file as follows:
<key>CFBoundleIconName</key>
<string>AppIcon</string>
Do we need to write "AppIcon" in the red square in the Picture below?
In the Icon part, I added a 120x120 pixel file named "Icon_120x120.png" (with bold font in Info.plist file ) for iphone and called it in the "Info.plist" and "Contents.json" file as follows.
Info.plist file:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon_29.png</string>
<string>Icon_40.png</string>
<string>Icon_50.png</string>
<string>Icon_57.png</string>
<string>Icon_58.png</string>
<string>Icon_72.png</string>
<string>Icon_76.png</string>
<string>Icon_80.png</string>
<string>Icon_100.png</string>
<string>Icon_114.png</string>
<string>Icon_120.png</string>
<string>Icon_120x120.png</string>
<string>Icon_144.png</string>
<string>Icon_152.png</string></array>
</dict>
</dict>I didn't know if the <key>CFBundle Icons</key> and <key>CFBundle Icons~ipad</key> sections and the icon names in it should be included in the Info.plist file or should I delete it?Because they suggested deleting it from the Info.plist file below in a document.
<key>CFBundleIconFile</key>
<key>CFBundleIcons</key>Contents.json file
{
"size" : "120x120",
"idiom" : "iphone",
"filename" : "Icon_120x120.png",
"scale" : "2x"
}
The following mandatory ios-marketing icon has also been added to the Contents.json file:{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon_App-1024x1024@1x.png",
"scale" : "1x"
}Even though I edited the above parts, I still get the same error. Am I missing something somewhere, can you help?
Finally, shall we add or delete lines of code from the iOS.pri or MyProject.pro files? as follows:
QMAKE_ASSET_CATALOGS = $$PWD/ios/Images.xcassets
QMAKE_ASSET_CATALOGS_APP_ICON = “AppIcon”@tkoka I never have icon names in my info.plist
this information is part of my .proios { QMAKE_INFO_PLIST = ios/Info.plist QMAKE_ASSET_CATALOGS = $$PWD/ios/Images.xcassets QMAKE_ASSET_CATALOGS_APP_ICON = "AppIcon" ios_artwork.files = $$files($$PWD/ios/iTunesArtwork*.png) QMAKE_BUNDLE_DATA += ios_artwork app_launch_screen.files = $$files($$PWD/ios/MyLaunchScreen.storyboard) QMAKE_BUNDLE_DATA += app_launch_screen QMAKE_IOS_DEPLOYMENT_TARGET = 12.0 QMAKE_TARGET_BUNDLE_PREFIX = org.blabla QMAKE_BUNDLE = myapp # Note for devices: 1=iPhone, 2=iPad, 1,2=Universal. QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2 }
and this is my project structure:
-
Thanks @ekkescorner,
What pixcel size icons are available in the AppIcon.appiconset folder, and what pixcel size are the iTunnesArtwork@ .png files?I'll try the solution you suggested above.
-
Thanks @ekkescorner,
What pixcel size icons are available in the AppIcon.appiconset folder, and what pixcel size are the iTunnesArtwork@ .png files?I'll try the solution you suggested above.
@tkoka these are the images
...Artwork1,2,3: 512,1024,1536
BTW: I'm using MakeAppIcon to generate the icons
-
Thanks @ekkescorner, problem was solved :)
Thank you for explaining the answer very simply and clearly. It's a great experience. -
Thanks @ekkescorner, problem was solved :)
Thank you for explaining the answer very simply and clearly. It's a great experience.@tkoka said in [iOS] Appstore trouble with CFBundleIconName and asset catalog - something to do with xcode 14.1 and iOS 16.1 SDK:
Thanks @ekkescorner, problem was solved :)
Thank you for explaining the answer very simply and clearly. It's a great experience.great to hear :)