Generate a _CFURLAliasData entry for Finder toolbar
Generate a _CFURLAliasData entry for Finder toolbar
- Subject: Generate a _CFURLAliasData entry for Finder toolbar
- From: Gary Ash <email@hidden>
- Date: Fri, 15 May 2015 15:37:46 -0400
I’m trying to programmatically add a link to an app to Finder’s toolbar.
I’ve found that dragging an app onto the toolbar works like a charm and adds a dictionary entry to NSToolbar Configuration Browser->TB Item Plists in the format:
_CFURLStringType Number 15
_CFURLString String file:///Applications/FinderTools.app/Contents/Resources/fix-finder.app
_CFURLAliasData Data <00000000 01b00002 00010c4d 6163696e 746f7368 20484400 00000000 00000000 00000000 0000d0f7 f515482b 00000091 31b90e66 69782d66 696e6465 722e6170 70000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000091 31bdd17b bfda0000 00000000 0000ffff ffff0000 09200000 00000000 00000000 00000000 00095265 736f7572 63657300 00100008 0000d0f8 3b650000 00110008 0000d17b f81a0000 00010010 009131b9 009131b2 009131b1 0000008a 0002004f 4d616369 6e746f73 68204844 3a417070 6c696361 74696f6e 733a0046 696e6465 72546f6f 6c732e61 70703a00 436f6e74 656e7473 3a005265 736f7572 6365733a 00666978 2d66696e 6465722e 61707000 000e001e 000e0066 00690078 002d0066 0069006e 00640065 0072002e 00610070 0070000f 001a000c 004d0061 00630069 006e0074 006f0073 00680020 00480044 0012003e 4170706c 69636174 696f6e73 2f46696e 64657254 6f6f6c73 2e617070 2f436f6e 74656e74 732f5265 736f7572 6365732f 6669782d 66696e64 65722e61 70700013 00012f00 ffff0000>
I’m having trouble decoding an replicating the _CFURLAliasData entry. If figure it has to be the output from bookmarkDataWithOptions but I haven’t hit on the right combination of options and I wondered if anyone has an insight to offer. Looking at in with hex editor seems to show an HPFS path but it’s not as simple as specifying NSURLBookmarkCreationSuitableForBookmarkFile.
Thanks for any help
Gary
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden