Re: FileWrapper Icon for non-document based app
Re: FileWrapper Icon for non-document based app
- Subject: Re: FileWrapper Icon for non-document based app
- From: Eric Forget <email@hidden>
- Date: Fri, 23 Jan 2004 09:10:27 -0500
>
> I have a non-document based app that creates a package file using
>
> NSFileWrapper and everything works on this part. The problem that I am
>
> having is that the file package is viewed by Finder as a folder as
>
> opposed to a packaged file.
>
>
>
> I searched the archives as how to fix this and the results that I found
>
> was to simply edit the plist file with an entry of
>
> CFBundleDocumentTypes. However most of them were geared towards
>
> document based apps.
>
>
>
> I'm just unsure as to how to have the file package created use the same
>
> icon that my app uses.
>
>
Here's an example for a non-document app, but leave the comments out ;-)
>
<key>CFBundleDocumentTypes</key>
>
<array>
>
<dict>
>
<key>CFBundleTypeExtensions</key>
>
<array>
>
<string>myext</string> // your extension
>
</array>
>
<key>CFBundleTypeIconFile</key>
>
<string>myIcon.icns</string> // your icon file inside the app's
resources
>
<key>CFBundleTypeName</key>
>
<string>My Document</string> // the document name to appear in "Get
Info"
>
<key>CFBundleTypeOSTypes</key>
>
<array>
>
<string>TyPe</string> // your file type (optional)
>
</array>
>
<key>CFBundleTypeRole</key>
>
<string>None</string> // or Editor, or whatever
>
<key>LSTypeIsPackage</key>
>
<true/>
>
</dict>
>
</array>
If that is not enough. Put your application in the trash. Empty the trash.
Rebuild your app. Launch it one time. Log out. Log in. This is often needed,
to let Finder updates its cache about your application.
Eric
___________________________________________________________________
Eric Forget Cafederic
email@hidden <
http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.