Re: finding bundle identifiers
Re: finding bundle identifiers
- Subject: Re: finding bundle identifiers
- From: Ken Thomases <email@hidden>
- Date: Wed, 10 Jun 2009 05:29:20 -0500
On Jun 10, 2009, at 5:08 AM, Jean-Daniel Dupas wrote:
Le 10 juin 09 à 11:51, Ken Thomases a écrit :
On Jun 10, 2009, at 4:27 AM, Rick C. wrote:
to be more specific on what i'm trying to do i would like to be
able to review the files in a preferences folder and find the
related app on the system. so i was trying to come up with a list
of identifiers for comparison. but it seems that some files in a
preferences folder (plists) do not match up with the identifier of
the related app. maybe this is due to the fact that a single app
can create multiple plist files. any input on how i can achieve
what i'm trying to do?
It's not generally possible to go from an arbitrary file to some
"related" app. And the files in the .../Library/Preferences
folders are effectively arbitrary. Sure, the vast majority of them
are created by the CFPreferences or NSUserDefaults APIs, in which
case they are probably named after bundle IDs, but some apps just
write files directly to those folders. Those apps don't always
name their files using their bundle IDs.
No need to write file directly in the Preferences folder, you can
pass any identifier when you use (low-level) CFPreferences API.
True, which is why I said "probably", above. But 1) my point is that
the files are arbitrary, not necessarily even created by CFPreferences
or NSUserDefaults; and 2) they may not even conform to the reverse-DNS
naming convention that CFPreferences says you should use for an app ID
parameter.
Lastly, you might be working from the files when you should be
working from preference domains. The frameworks currently work in
terms of .plist files, but there's no guarantee that they will in
the future. They may start working in terms of some unified
database, or whatever.
And they will call it the Registry ;-)
Heh. I thought of saying something like "... like the Windows
registry", but decided not to pain all of my readers. Apparently, the
suffering was inevitable. ;) And, I definitely am _not_ advocating
such a change, nor do I imagine it likely.
Cheers,
Ken
_______________________________________________
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