ITMS-90892: Missing recommended icon error from Apple App Store - ios

I get this error when submitting my app to the App Store recently.
ITMS-90892: Missing recommended icon - The bundle does not contain an alternate app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See
It's related to the alternate icons in the app structure and the names I think but has nothing to do with the assets catalog. In my app a user can choose and icon for the Home Screen.
I have 4 icons to choose and 4 sizes for each icon named e.g. - AA_appIcon#2x, AA_appIcon#2x~iPad, AA_appIcon#3x, AA_appIcon83.5#2x~iPad and it used to work fine, but now I get this error for the one name AA_appIcon83.5#2x~iPad.
It is in the correct size 167x167, so not sure what the problem is.
It just happen in the last few days, didn't happen on my previous submission a month ago.
The naming format must have recently changed or something.
Is anyone able to spot the error?
This is the info.plist
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>AA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>Cake</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>NA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>NA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>OA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>OA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>AA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>Cake</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>NA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>NA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>OA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>OA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>

Here's what you need as of late 2021 if you're getting error ITMS-90890 or ITMS-90892, etc.
File Name
size
IconName#2x.png
120x120
IconName#3x.png
180x180
IconName#2x~ipad.png
152x152
IconName#3x~ipad.png
167x167
*Note the lack of capitalization on ~ipad!

Based on #Warpling answer, here is everything you need to setup alternate icon correctly:
1. Create the icon files
First, you'll have to create a folder named AlternateAppIcons inside your main project (where the info.plist file is located).
Now, inside the folder you've created, add the files with the names and sizes that described in the table:
File Name
Size
IconName#2x.png
120x120
IconName#3x.png
180x180
IconName#2x~ipad.png
152x152
IconName#3x~ipad.png
167x167
I'd recommend you to use Icon Set Creator to generate all sizes, then
Make sure that the file names are exactly the same (case sensitive) after the #.
When you change IconName, make sure to change it as well in the info.plist.
2. Configure info.plist
You'll have to add this to the info.plist:
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>IconName</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>IconName</string>
</array>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>IconName</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>IconName</string>
</array>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
3. Change the icon programmatically
All you have to do is to validate that the app supports alternate icons and change it:
guard UIApplication.shared.supportsAlternateIcons else { return }
UIApplication.shared.setAlternateIconName("IconName")
*You may want to create some enum helper like this.

Nevermind
I just renamed the icon from AA_appIcon83.5#2x~iPad.png to AA_appIcon#3x~ipad.png and the error went away and the icon picker still works from within the app.

Related

How do I pick a .pgw file in the iOS document picker?

I'm developing an iOS app that needs to read .pgw files (https://en.wikipedia.org/wiki/World_file) from the local device storage. I have a sample file on my device that I'm trying to open from within the app. When I open the document picker, I can see the file but it's greyed out and I can't select it. In that screenshot, malaysia-google-earth.pgw is the file I'm trying to open.
If I change the file extension of that file to .txt, it's no longer greyed out and I can select it. So I know it's a problem with the file extension.
I've tried to add .pgw to the supported document types list for the app, but since there is no Uniform Type Identifier for this extension, I'm not sure if I'm adding it correctly. My Info.plist file includes these keys:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>PNG World File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.pgw</string>
</array>
</dict>
</array>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIFileSharingEnabled</key>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>PNG World File</string>
<key>UTTypeIconFiles</key>
<array/>
<key>UTTypeIdentifier</key>
<string>public.pgw</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>pgw</string>
</array>
</dict>
</dict>
</array>
<true/>
I am using iOS version 13.6, and this is a React Native app using react-native-document-picker.

App can create own iCloud Drive Folder, save there but isn't listed in apps for opening files there?

I've created a new file type unique to my App. A user can now save, for the purpose of sharing, backup etc., files of this type to the App's own folder on iCloud Drive.
This feature is now live on the app store and works with one, odd, exception.
If I tap on my new file type, anywhere in iCloud Drive except the App's own folder, my App appears as an option in "Copy to ..."
I'd prefer if it just opened it which might be part of the problem.
If I tap on a file in it's own folder the App is not listed in "Copy to ...".
If I add the file to a website it can open it fine from there too.
It can create new files in it's own folder no problem.
What am I missing?
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>CSL-icon-64x64.png</string>
<string>CSL-icon-44x58.png</string>
<string>CSL-icon-22x29.png</string>
<string>CSL-icon-320x320.png</string>
</array>
<key>CFBundleTypeName</key>
<string>CSL File Type</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.mydomain.csl</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>CSL File Type</string>
<key>UTTypeIdentifier</key>
<string>com.mydomain.csl</string>
<key>UTTypeSize320IconFile</key>
<string>CSL-icon-320x320</string>
<key>UTTypeSize64IconFile</key>
<string>CSL-icon-64x64</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>csl</string>
</array>
<key>public.mime-type</key>
<string>application/something</string>
</dict>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>CSL File Type</string>
<key>UTTypeIdentifier</key>
<string>com.mydomain.csl</string>
<key>UTTypeSize320IconFile</key>
<string>CSL-icon-320x320</string>
<key>UTTypeSize64IconFile</key>
<string>CSL-icon-64x64</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>csl</string>
</array>
<key>public.mime-type</key>
<string>application/something</string>
</dict>
</dict>
</array>
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.com.mydomain.myapp</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerName</key>
<string>SomeDirName</string>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
This is an anonymised version of the meta taken from my App's info.plist file, not an exact copy.

How to add swift compiler custom flag through XCode templates

I've try to add swift compiler custom flag in target through XCode Templates
Default
<key>Targets</key>
<array>
<dict>
<key>Configurations</key>
<dict>
<key>Debug</key>
<dict/>
<key>Release</key>
<dict/>
</dict>
<key>Name</key>
<string>___PACKAGENAME___</string>
<key>SharedSettings</key>
<dict>
<key>OTHER_SWIFT_FLAGS</key>
<array>
<key>Debug</key>
<string>-DDEBUG</string>
</array>
</dict>
</dict>
</array>
Template
I want to access only debug key. Is it possible?
You were almost there!
This is how the TemplateInfo.plist should look like
<key>Targets</key>
<array>
<dict>
<key>Configurations</key>
<dict>
<key>Debug</key>
<dict>
<key>OTHER_SWIFT_FLAGS</key>
<array>
<string>-DDEBUG</string>
</array>
</dict>
</dict>
</dict>
</array>
And here is the result

Trying to define GPX document type in Xcode 6.4

I'm trying to define a GPX document type so that I can open gpx file types from other applications. I've followed Apple's Technical Q&A on this topic.
I've also tried solutions that I found that edited the plist file directly. None of them have worked. I still don't see my application in the "Open In" menu when I try to open a gpx file. I'm pretty sure I'm missing something here. I just don't have any idea what it is. Please help.
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.xml</string>
</array>
<key>UTTypeDescription</key>
<string>GPS Exchange Format (GPX)</string>
<key>UTTypeIdentifier</key>
<string>com.topografix.gpx</string>
<key>UTTypeReferenceURL</key>
<string>http://www.topografix.com/GPX/1/1</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>gpx</string>
</array>
<key>public.mime-type</key>
<string>application/gpx+xml</string>
</dict>
</dict>
</array>
Make sure you define the UTI for GPX in your plist since it is not defined as part of the default iOS UTIs. You can do this by adding the GPX UTI to your target.
Select your Project file
select your target
select "Info"
expand "Import UTIs
Click the + icon
Add the GPX UTI info
You can also edit the plist directly if you want.
Here is what it should look like:
In the plist it will look like this:
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.topografix.gpx</string>
<key>UTTypeReferenceURL</key>
<string>http://www.topografix.com/GPX/1/1</string>
<key>UTTypeDescription</key>
<string>GPS Exchange Format (GPX)</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.xml</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>gpx</string>
</array>
<key>public.mime-type</key>
<string>application/gpx+xml</string>
</dict>
</dict>
</array>
Good info on this blog as well...
UPDATE
I assume you already have the document type defined as well in the plist. It should match this:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>GPS Exchange Format (GPX)</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.topografix.gpx</string>
</array>
</dict>
</array>
Also implementing CFBundleDocumentTypes to plist allows your app to open when the air drop content conforms to your UTI.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>GPX File</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>com.your-Bundle-Idenitifer.gpx</string>
</array>
</dict>
</array>

Configure iOS plist so that associated files only open in my App

I have associated a filetype with my iOS app, which works fine. However I want the file type to be exclusive, so that other applications do not offer to 'open in' my file.
I have an app by another developer that does this, but I can't work out how it is done. I have extracted the plist for this app and I cannot see what it is doing to make this happen.
This is what I want to do :
This is what happens in my App:
This is how I have the file associations setup in my plist:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>abcd</string>
</array>
<key>CFBundleTypeName</key>
<string>My File</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.myapp.abcd</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>com.myapp.abcd</string>
</array>
<key>UTTypeDescription</key>
<string>My File</string>
<key>UTTypeIconFile</key>
<string>icon</string>
<key>UTTypeIdentifier</key>
<string>com.myapp.abcd</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>abcd</string>
</array>
</dict>
</dict>
</array>
What am I missing?? Does anyone know how to enable this functionality?
Thanks
Duncan

Resources