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: How do I read pref files for other Apps



On 5/14/03 8:12 PM, Scott Mitchell didst favor us with:

> On Wednesday, May 14, 2003, at 04:51 PM, Duane Murphy wrote:
>
> --- At Wed, 14 May 2003 18:25:32 -0500, Bryan Pietrzak wrote:
>
> On Wednesday, May 14, 2003, at 05:54 PM, Scottq Mitchell wrote:
>
> The program that I just wrote, will soon be bundled with a bunch of
> different programs, but all the programs will be registered under the
> one SN. What I need to be able to do is read the Preference file for
> this bundled set of programs, and check to make sure that the user
> registered. Now I can read my own preferences, and I know the name of
> the file I need to read from, and keys that I need to read in there.
> But I can not figure out how to read the property list form this file.
> Can anyone out there give me an example of how to do this? I searched
> through the list archives, but can not seem to find anything related
> to this.
>
> Hmm, I don't think you can do this directly with the CF Preferences
> APIs.
>
> When I looked (briefly) at moving to the CF Pref APIs this was one of
> the things I noticed seemed to be a problem.
>
> Use the Application ID of the other application. I've done this several
> times. In fact this is how the default tool works. The name of the
> preference file is just determined by the id. By default, the id is the
> bundle identifier of the application. I expect you can use anything you want.
>
> If all the applications need to work together for this one file then make
> up a new unique identifier for this file and use that in all the applications.
>
> No this won't work. What this is, is a CD with a bunch of Apps on the CD. They
> are installed and registered under one SN. Now there is no main Application
> for this. But in order to install this Group of applications the user has to
> put in a SN. Now I need to be able to check this SN to make sure they have a
> pre-registered copy of my app that was installed with this bundle of
> applications. If not I will present them with my own registration stuff. Like
> I said I know the name of the file that will be created in the Preferences,
> and the key I need to look for.
>
> Thanks though.
>
> Thanks,
> Scott Mitchell


Okay, this is a little hard to follow since you're quoting style is, well,
non-existent. But, if this is a prefs file created and maintained by
CFPreferences, then you should be able to use the identifier used to create
it to access it. If for some reason that's not possible, but you can locate
the file, you can read it yourself and use other Core Foundation APIs to
parse it and look for the key, or do you just need to verify the existence
of something in the file you locate with a simple search?


Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How do I read pref files for other Apps (From: Scott Mitchell <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.