Post

Replies

Boosts

Views

Activity

Reply to Defining custom file types
See Apple doc Defining file and data types. There is an example there. Here is another one. This DEFINES a "custom UTI". This goes in info.plist: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeIdentifier</key><string>com.yourcompany.yourfileext</string> <key>UTTypeConformsTo</key><array><string>public.text</string></array> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key><array><string>yourfileext</string></array> </dict> </dict> </array> Note UTTypeConformsTo public.text. If it isn't readable text, use public.data. Then you need to say that your app can load the "custom UTI" com.yourcompany.yourfileext defined above. See Core Foundation Keys / CFBundleDocumentTypes. Since com.yourcompany.yourfileext is YOUR UTI (not some other company's data that you know how to load), also say you are "Editor" and "Owner". Example: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>some description here</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>com.yourcompany.yourfileext</string> </array> </dict> </array>
Topic: App & System Services SubTopic: General Tags:
Apr ’25