• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
documentClassForType:typeName is dynamic type instead of my declared type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: documentClassForType:typeName is dynamic type instead of my declared type
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Core Data concurrency during import of folder contents
  • Next by Date: Re: documentClassForType:typeName is dynamic type instead of my declared type
  • Previous by thread: Re: Job postings at Cocoa mailing list
  • Next by thread: Re: documentClassForType:typeName is dynamic type instead of my declared type
  • Index(es):
    • Date
    • Thread