Re: Implications of changing an app's bundle identifier
Re: Implications of changing an app's bundle identifier
- Subject: Re: Implications of changing an app's bundle identifier
- From: Daniel Jalkut <email@hidden>
- Date: Sat, 24 Feb 2007 20:29:39 -0500
It might be worth considering that in some instances, the user
could be likely to run an older version of the application after
running the newer version. For instance, what if they were trying out
a new version but decided after running it once to stick with the
older version.
In this case, they would find all of their preferences "lost" and
with no obvious way to get them back.
I've been thinking about this lately, too. I think the best thing
might be to add a pref to the new preferences
"DidMigrateOldPrefs" ... if it's set, don't do anything. If it's not,
just copy the old prefs over but leave them around.
Daniel
On Feb 24, 2007, at 6:52 PM, Darkshadow wrote:
+ (void)initialize
{
NSDictionary *oldPrefs = [[NSUserDefaults standardUserDefaults]
persistentDomainForName:@"old.bundle.identifier"];
if ( oldPrefs ) {
[[NSUserDefaults standardUserDefaults]
setPersistentDomain:oldPrefs forName:[[NSBundle mainBundle]
bundleIdentifier]];
[[NSUserDefaults standardUserDefaults]
removePersistentDomainForName:@"old.bundle.identifier"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
/* Whatever else you may have been doing here */
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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