documentClassForType:typeName is dynamic type instead of my declared type
documentClassForType:typeName is dynamic type instead of my declared type
- Subject: documentClassForType:typeName is dynamic type instead of my declared type
- From: Steve Mills <email@hidden>
- Date: Tue, 03 Feb 2015 14:07:33 -0600
I'm setting up my document types and exported UTIs in my Info.plist. (The main type is a package, if that matters.) The Save dialog correctly shows my type at the top of the Type popup, it saves it with the correct extension, and Finder shows that it's a package, not a folder. But when I drag & drop the file to my app, the type given to documentClassForType: is dyn.ah62d4qmuhk2x44pdra instead of my UTI. I've tried the usual crap, like cleaning the build folder, building, and logging out. Ideas? My plist entries are below.
I also tried adding the same type as an imported UTI. Some examples show the extension and description/name in both CFBundleDocumentTypes and UTExportedTypeDeclarations, while others show it only in the UTExportedTypeDeclarations. Which is correct?
No Mac project would be complete if I didn't run into Info.plist problems at some point.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>chest</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>DocIcon</string>
<key>CFBundleTypeName</key>
<string>Image Chest Catalog</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.armpitstudios.$(PRODUCT_NAME:rfc1034identifier).chest</string>
</array>
<key>LSTypeIsPackage</key>
<integer>1</integer>
<key>NSDocumentClass</key>
<string>Document</string>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Image Chest Catalog</string>
<key>UTTypeIconFile</key>
<string>DocIcon</string>
<key>UTTypeIdentifier</key>
<string>com.armpitstudios.$(PRODUCT_NAME:rfc1034identifier).chest</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>chest</string>
</array>
</dict>
</dict>
</array>
--
Steve Mills
Drummer, Mac geek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden