I have created a Java application and created a Mac .app file from it to run simply on Mac OS X. The application can create special project files and save them with the extension *.ksdi so the user can easily run those project files again and edit them.
What I would like to do is allow the user who installed the application on his Mac to be able to double click those *.ksdi files to automatically run the program and automatically load the project file. How can I do that in Mac?
Can I assign an extension to my Mac program through a script or something like that so user won't have to assign the extension to the program manually?
Update: Trial solution:
I have read in another post that I should add a key to the *.plist file to accomplish this, so I added this to it:
<plist>
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSItemContentTypes</key>
<array>
<string>public.ksdi</string>
</array>
</dict>
</array>
</dict>
</plist>
I saved the plist file, but I do not know how to activate this! I have run the application, restarted my mac, but still when double clicking any ksdi file it doesn't open it with the program... Any help?