16
votes

I'm getting this error while I try to upload the app to App Store. I don't know what is the reason for this.

Error while trying to upload

WARNING ITMS-90788: "Incomplete Document Type Configuration. The CFBundleDocumentTypes dictionary array in the 'Bundle-ID' Info.plist should contain an LSHandlerRank value for the CFBundleTypeName 'MKDirectionsRequest' entry. Refer to https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW1 for more information on the LSHandlerRank key."

Can some provide me a solution for this issue on how to fix it.

2
what you have in your Info.plist file for document types?m1sh0
The error looks fairly self explanatory, What part do you need help with?Scriptable
@m1sh0 I don't have anything in my plist for document types. its empty.SathyaSrinivas6
@Scriptable I need help on how to solve this issue.SathyaSrinivas6
can you add your info plist file? Also do you use pods? And if you have some external libraries how you add them?m1sh0

2 Answers

22
votes

Here is how LSHandlerRank key looks like in the info.plist.

enter image description here

OR (Open info.plist as 'Source Code' & add)

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>Text</string>
        <key>LSHandlerRank</key>    //Key you need to fix your issue //
        <string>Alternate</string>  //Here value can be Owner, Default or Alternate
        <key>LSItemContentTypes</key>
        <array>
            <string>public.plain-text</string>
        </array>
    </dict>
</array>

Here is the description from Apple why and how you can provide the LSHandlerRank Key.

Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.
The possible values are:
Owner (this app is the primary creator of files of this type),
Default (this app is an opener of files of this type; this value is also used if no rank is specified),
Alternate (this app is a secondary viewer of files of this type), and None (this app is never selected to open files of this type, but it accepts drops of files of this type).
Launch Services uses the value of LSHandlerRank to determine the app to use to open files of this type.
The order of precedence is: Owner, Default, Alternate. This key is available in macOS 10.5 and later and iOS 3.0 and later.

You can find more on this link: https://developer.apple.com/documentation/uikit/view_controllers/adding_a_document_browser_to_your_app/setting_up_a_document_browser_app

4
votes

I was getting the warning as follows from Apple:

We identified one or more issues with a recent delivery for your app.Your delivery was successful, but you may wish to correct the following issues in your next delivery:

ITMS-90788: Incomplete Document Type Configuration - The CFBundleDocumentTypes dictionary array in the 'XXXXXXX' Info.plist should contain an LSHandlerRank value for the CFBundleTypeName 'MKDirectionsRequest' entry.

so following entry in plist fixed the problem -

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>MKDirectionsRequest</string>
            <key>LSHandlerRank</key>
            <string>Alternate</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.apple.maps.directionsrequest</string>
            </array>
        </dict>
    </array>
    <key>CFBundleExecutable</key>