• 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: Editing another file's plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing another file's plist


  • Subject: Re: Editing another file's plist
  • From: Audun Wilhelmsen <email@hidden>
  • Date: Sat, 10 Jul 2004 08:08:50 +0200

Check out NSUserDefaults:
- (NSDictionary *)persistentDomainForName:(NSString *)domainName

Example:
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *desktopDefaults = [[userDefaults
persistentDomainForName: @"com.apple.desktop"] mutableCopy];

I didn't test it, but it should work. When you're done:
[userDefaults removePersistentDomainForName:@"com.apple.desktop"];
[userDefaults setPersistentDomain: desktopDefaults
forName:@"com.apple.desktop"];
[userDefaults synchronize];

Audun Wilhelmsen
------------------------------------------------------------
BrainByte (brainbyte.digitalhybrid.net)
Norway


On 10. jul. 2004, at 05.03, Kodex wrote:

> I am trying to edit the com.apple.desktop plist from
> within my application, i was wondering if there was a
> method for doing this. One of the problems i am having
> is that the field i want to enter is contained within
> a dictionary that seems to a diffrent string of
> numbers on every computer. Is there an easy way to
> access and change this infomation? Any code examples
> would be great. Thanks as always everyone.
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> 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.


References: 
 >Editing another file's plist (From: Kodex <email@hidden>)

  • Prev by Date: Re: WebView initialization
  • Next by Date: Re: Compositing Tricks?
  • Previous by thread: Editing another file's plist
  • Next by thread: WebView initialization
  • Index(es):
    • Date
    • Thread