RE: Info.plist
RE: Info.plist
- Subject: RE: Info.plist
- From: "Josh Ferguson" <email@hidden>
- Date: Thu, 21 Feb 2002 14:49:33 -0600
- Thread-topic: Info.plist
Douglas,
I was talking about runtime, and about half an hour after I submitted this yesterday I found and implemented a better solution using NSUserDefaults. Thanks for the heads up =)
Josh
-----Original Message-----
From: Douglas Davidson [
mailto:email@hidden]
Sent: Thursday, February 21, 2002 11:35 AM
To: Josh Ferguson
Cc: email@hidden
Subject: Re: Info.plist
On Wednesday, February 20, 2002, at 11:45 AM, Josh Ferguson wrote:
>
Ok, I know I'm missing something pretty basic here, but I'm trying to
>
write to the Info.plist file in my application Bundle. What is the
>
recommended process for doing this? Should I not even be modifying the
>
Info.plist? Should I be using a seperate custom property list that I
>
create and specify in Resources? What's the standard approach for
>
this? I'm trying to store a serial number for later retrieval. I have
>
no problems reading from it, or even modifying entries while the
>
program is running, but I can't seem to find a way to permanently store
>
the information.
Do you mean you want to modify it at build time? The easiest way is to
edit it in Project Builder, if you are using PB, or else to use the
PropertyListEditor application.
Or do you mean you want to modify it at install time? That would be
possible, using the CoreFoundation XML property list and CFURL APIs (or
their Cocoa equivalents), although it would be a bit unusual.
Or do you mean you want to modify it at runtime? That would be a bad
idea. You should not assume that your application will be writable at
runtime. The user may not have sufficient permissions to modify the
application, or the application may be stored on a network volume, or
even on a CD. The standard mechanism for storing configuration
information at runtime is CFPreferences (or NSUserDefaults).
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.