Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch services file association




On Jan 14, 2007, at 12:55 AM, Daniel Birns wrote:


Hi Larry,

I was very excited by your response, and put this into my info.plist:

	<dict>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>dart</string>
			</array>
			<key>CFBundleTypeIconFile</key>
			<string>DartPlayer.icns</string>
			<key>CFBundleTypeName</key>
			<string>Dart</string>
			<key>CFBundleTypeOSTypes</key>
			<array>
				<string>dart</string>
			</array>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>LSIsAppleDefaultForType</key>
			<true/>
			<key>LSTypeIsPackage</key>
			<false/>
			<key>NSPersistentStoreTypeKey</key>
			<string>XML</string>
		</dict>

Unfortunately, that had no effect -- The binding still defaults to mounting a .dart file as a disk image. I wonder why?

This is after I copied the .app bundle into Applications and ran the application.
I even tried rebuilding the launchservices with lsregister, to no avail.

Sorry, I didn't know if it would work or not. If no one has a better idea than what you're doing now, my only other suggestion would be to write email@hidden and ask where you can find documentation explaining how to do what you want or sample code for it. Their response may be helpful. If you actually ask them how to do it they'll probably want to charge you a tech support incident. OTOH, if you tell they what you're doing now and they don't have a better way, they probably won't charge for an incident.


BTW, you shouldn't need this:

			<key>LSTypeIsPackage</key>
			<false/>

because false is the default.

Also:
			<key>CFBundleTypeOSTypes</key>
			<array>
				<string>dart</string>
			</array>

All FourCharCodes that are all lowercase (such as this file type) are reserved by Apple, so you should have at least one upper case letter in your file type. (Using all lowercase like this is just setting yourself up for another potential conflict with an Apple application.) Do the files that are opening in the wrong application have this file type?

Larry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >RE: launch services file association (From: Daniel Birns <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.