Getting Error on validating application on infoplist

Error reported is The product archive is invalid. The value of the CFBundleDocumentTypes key in the Info.plist must be an array of dictionaries, with each dictionary containing at least the CFBundleTypeName key. (ID: 8fc7f696-a7f3-410d-b228-a220594a9edb)

The info.plist is : <?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>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconSystemGenerated</key> <true/> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Default</string> <key>LSItemContentTypes</key> <array> <string></string> </array> <key>NSDocumentClass</key> <string>NSPersistentDocument</string> <key>NSUbiquitousDocumentUserActivityType</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER).blood-pressure-management.bpdb</string> </dict> </array> <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>com.apple.package</string> </array> <key>UTTypeIcons</key> <dict> <key>UTTypeIconText</key> <string>BP Management</string> </dict> <key>UTTypeIdentifier</key> <string>clays.reading</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>bpdb</string> </array> </dict> </dict> </array> <key>UTImportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>com.apple.package</string> </array> <key>UTTypeDescription</key> <string>reading database</string> <key>UTTypeIcons</key> <dict> <key>UTTypeIconText</key> <string></string> </dict> <key>UTTypeIdentifier</key> <string>clays.reading</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>bpdb</string> </array> </dict> </dict> </array> </dict> </plist> Application works just fine, what am I missing

Answered by Sir-Ian in 857338022

Every entry in CFBundleDocumentTypes must include a CFBundleTypeName key, which is a plain-language label (for example, “Blood Pressure Database”) that describes the file type.

Right now your plist only has the technical bits (like LSItemContentTypes) but not that required name.

To fix is add a CFBundleTypeName string to the dictionary, and make sure LSItemContentTypes isn’t empty but points to their declared UTI (e.g. clays.reading). Once those two pieces are in place, the archive should validate.

Accepted Answer

Every entry in CFBundleDocumentTypes must include a CFBundleTypeName key, which is a plain-language label (for example, “Blood Pressure Database”) that describes the file type.

Right now your plist only has the technical bits (like LSItemContentTypes) but not that required name.

To fix is add a CFBundleTypeName string to the dictionary, and make sure LSItemContentTypes isn’t empty but points to their declared UTI (e.g. clays.reading). Once those two pieces are in place, the archive should validate.

Getting Error on validating application on infoplist
 
 
Q