Re: choose core data store file at app launch
Re: choose core data store file at app launch
- Subject: Re: choose core data store file at app launch
- From: Richard Heard <email@hidden>
- Date: Fri, 29 Mar 2013 02:32:05 -0700
So you can easily recreate this behaviour yourself by doing this on launch.
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification{
if (([NSEvent modifierFlags] & NSAlternateKeyMask) != 0){
//holding down option on launch
//Do the optional path stuff
} else {
//Do the default stuff
}
}
-Richard
On 29/03/2013, at 1:53:33 AM, Martin Hewitson <email@hidden> wrote:
> Dear list,
>
> I remember seeing the functionality in some apps where one can hold the option key while launching an app to allow the user to choose which app data store to launch. So is this a core-data app functionality that's already built in to the frameworks, or does one need to implement that individually? I have a core data shoebox type app and rather than go all out making it iCloud compatible (because I still haven't been able to get that working reliably) I was considering playing around with putting the core data store file in drop-box or simply in the iCloud mobile-documents folder to see how that behaves. This wouldn't be for a production app, just for playing and testing at the moment.
>
> So rather than hard-coding an alternative path to the data store, I was thinking that an option-click for launching would be a nice way to choose different store files. Like I said, I'm sure I've seen this in other apps before...
>
> Many thanks for any insights,
>
> Martin
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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