• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: finding bundle identifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding bundle identifiers


  • Subject: Re: finding bundle identifiers
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 10 Jun 2009 12:08:10 +0200


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.


Even if you do assume that those files are named after bundle IDs, then it seems strange to try to go from the list of all application bundle IDs to the files. Why not go from the file names, parsing out the bundle IDs, to the apps? It's easy enough to look up or manipulate an app given its bundle ID.

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 ;-)


_______________________________________________

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


  • Follow-Ups:
    • Re: finding bundle identifiers
      • From: Ken Thomases <email@hidden>
References: 
 >finding bundle identifiers (From: "Rick C." <email@hidden>)
 >Re: finding bundle identifiers (From: "Rick C." <email@hidden>)
 >Re: finding bundle identifiers (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: finding bundle identifiers
  • Next by Date: Re: finding bundle identifiers
  • Previous by thread: Re: finding bundle identifiers
  • Next by thread: Re: finding bundle identifiers
  • Index(es):
    • Date
    • Thread