# Proper way to create a proprietary file extension?



## cap10subtext (Oct 13, 2005)

Been tooling away at this for what seems like forever.

Let's say I have a text file I want to use as a .zzz extension project file. If I click on that project it should open only in my application and it should adopt my projectile.icns icon on the end users machine.

2 questions:

1. What's the "correct way to do this?" (cocoa, objective c, carbon, don't really care, just want to know the apple guidelines which I cannot find detailed instructions for).

2. Being that I'm using a non standard programing language (the still bundle .rsrc with the app if you can believe it), is there any alternative way I can affect a file/resource fork/app plist so that every .zzz file adopts my little custom icon on the end users computer?

All advice welcome.


----------



## Chealion (Jan 16, 2001)

1 and 2 kind of go hand in hand - in that it's a matter of telling Mac OS X (LaunchServices specifically) that you open .zzz files and to take "ownership" of those files. (CFBundleDocumentTypes and UTIs - document codes and creator codes are ignored in 10.6+). 

Check out:
objective c - Registering an icon for my application's document type. - Stack Overflow
Developer.apple.com : Understanding UTIs
Developer.apple.com : LaunchServices Concepts
Developer.apple.com : LaunchServices Reference


----------



## cap10subtext (Oct 13, 2005)

I just stumbled across those official Apple docs myself. Guess it just took a while to start googling the correct terms.

That StackO post is likely the little extra bit of I needed. Unfortunately not sitting with the plist infront of me to double check.

I had a weird surprise when after a day of trying to assign the custom icons including a number of restarts, suddenly it started looking like it was working. But now I have to go back and verify which the crucial bit of info was.

Thanks so much!


----------

