Re: Problem saving document with my doc icon
Re: Problem saving document with my doc icon
- Subject: Re: Problem saving document with my doc icon
- From: Kyle Sluder <email@hidden>
- Date: Mon, 15 Jul 2013 19:22:29 -0700
On Jul 15, 2013, at 7:14 PM, Peter Teeson <email@hidden> wrote:
> On 2013-07-13, at 3:43 PM, Peter Teeson wrote:
>> Thanks for helping me. I dug out the docs you recommended and will learn.
> Read them all and looked at example plist in TextEdit.
> I don't want any other app to read or edit my format. So have not exported the UTI.
That's not what the distinction between “exported” and “imported” means. They merely define an order precedence; if no exported types are found for a given tag (file extension, MIME type, etc.), but a matching imported type exists, the imported type will be used.
You don't get to stop other developers from attempting to open files produced by your app. And if you fail to export your type, then when a user installs an app that imports your type, their documents will all attempt to open in that app by default because you didn't declare yourself as authoritative on that type by declaring it as exported.
Please do read the UTI documentation. It explains all this.
> Still cannot get it to work. And the folder contents are correct. I feel stupid.
>
> Here is my current Info.plist.
> <?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>BuildMachineOSBuild</key>
> <string>11G63b</string>
> <key>CFBundleDevelopmentRegion</key>
> <string>en</string>
> <key>CFBundleDocumentTypes</key>
> <array>
> <dict>
> <key>CFBundleTypeIconFile</key>
> <string>DocIcons.icns</string>
> <key>CFBundleTypeName</key>
> <string>GImage Document</string>
> <key>CFBundleTypeRole</key>
> <string>Editor</string>
> <key>LSItemContentTypes</key>
> <array>
> <string>com.apple.package</string>
This is wrong. It needs to be _your_ UTI, which needs to _conform_ to com.apple.package. Right now, you're trying to claim that all file packages on the system are instances of your document type.
FWIW, no on-disk file or folder can ever be of type com.apple.package itself, because that type has no tags. A folder can only ever be of a type that _conforms_ to com.apple.package.
--Kyle Sluder
_______________________________________________
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