I've developed a small macintosh app which is sort of a mp3 download manager for an online digital store. The application is written in Actionscript using mProjector(a c .swf file wrapper)
[login to view URL]
The digital store serves up XML files with a .dxz extension to the browser, which the download manager opens, parses, then proceeds to download the files.
The problem is I can't figure out how to get the macintosh os to automatically associate the dxz files with my application.
If I manually associate the extension to the app in the browser and the OS it works, but really we need this association to take place during the installation process to remove the burden from the end user.
I added the following to the .app [login to view URL] file
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>dxz</string>
</array>
<key>CFBundleTypeName</key>
<string>Downloader File</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>dxzm</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
here is my second go at fixing the plist, this time with the idea to use applescript to take care of the associating:
1) get [login to view URL] file to have the proper entries for dxz(dXzm) files
here's my [login to view URL]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" " http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.mergerecords.downloader</string>
<key>UTTypeDescription</key>
<string>Downloader</string>
<key>UTTypeIconFile</key>
<string>merge_logo_256-01-01.icns</string>
<key>UTTypeConformsTo</key>
<array>
<string>[login to view URL] </string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>dXzm</string>
<key>public.filename-extension </key>
<array>
<string>dxz</string>
</array>
<key>public.mime-type</key>
<string>application/com.mergerecords.downloader</string>
</dict>
</dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>dxz</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>dXzm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>merge_logo_256-01-01.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/com.mergerecords.downloader</string>
</array>
<key>CFBundleTypeName</key>
<string>Merge Downloader File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>mPlayer</string>
<key>CFBundleGetInfoString</key>
<string>mProjector player 3.0.6 Copyright 2000-2007 Screentime Media</string>
<key>CFBundleIconFile</key>
<string>merge_logo_256-01-01.icns</string>
<key>CFBundleIdentifier</key>
<string> com.screentime.mProjector.mPlayer-1011801884</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Merge Downloader</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>mProjector player 3.0.6</string>
<key>CFBundleSignature</key>
<string>FOAM</string>
<key>CFBundleVersion</key>
<string>3.0.6</string>
<key>CGDisableCoalescedUpdates</key>
<true/>
<key>ENG_COPYRIGHT</key>
<string>Created with mProjector Copyright 2005-2007 Screentime Media</string>
<key>LSUIElement</key>
<string>0</string>
<key>NSHelpFile</key>
<string>ReadMe.html</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
2) get applescript to change the default application for a dxm file to the Downloader.
this should be super simple and triggerable from our installer. something like
tell finder to open dxz files with the download manager
but with proper applescript syntax!!!
- - -
If it would be faster, and/or make more sense, the whole thing could be rebuilt as a standard OS X application, with a standard installer.
Please contact me with any questions, and I can pass along source code from the actionscript used in the mprojector c .swf file wrapper as well.