• 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: portable app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portable app


  • Subject: Re: portable app
  • From: Laurent Daudelin <email@hidden>
  • Date: Thu, 30 Sep 2010 19:17:04 -0700

[NSBundle mainBundle] will return the path of the application bundle, not ~/Library/Application Support/[App Name]. You need to use "NSSearchPathForDirectoriesInDomains" with the appropriate masks to search in the user's Library.

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 					http://www.nemesys-soft.com/
Logiciels Nemesys Software              				email@hidden

On Sep 30, 2010, at 16:00, Ariel Feinerman wrote:

> Are you sure in the using of 'library/application support'? There is
> of the matter is that one is designed for the app data not for the
> user data.
> Maybe you should save such files in a directory relative to the bundle
> or in the bundle itself (not good idea). In this case you can launch
> your app from your drive.
>
> If your app is in /Users/user/yourapp, your files in
> /Users/user/yourapp/Application Support, it looks:
>
> NSString *appSupport = [[[[NSBundle mainBundle] bundlePath]
> stringByDeletingLastPathComponent] stringByAppendingPathComponent:
> @"Appication Support"];
>
>
>
> 2010/9/29 Amy Heavey <email@hidden>
>>
>> I'm writing an app for personal use, using core data.
>>
>> At the moment it's set up to save the data file in the library/application support/myapp folder on the machine. I also want to store a growing number of images to use with the app, so they are set to store in this folder as well.
>>
>> However, I'd like to be able to use this app on my laptop as well as the desktop. I don't really fancy managaing some kind of sync, and thought the best solution would be to store the app and all the data/images on a thumb drive. There's only me using the app, and having to walk and get the drive from the office isn't a huge headache, and I can easily take it with me if I want to work elsewhere (not on my home network).
>>
>> How would I set the data store to a mobile drive? can anyone point me at a tutorial? Is it as simple as naming the thumbdrive and referring to it by name in the code? The Code I've currently got is the auto/default type set up, following the Hillegass book as well,
>>
>> Thanks,
>> Amy

_______________________________________________

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

References: 
 >portable app (From: Amy Heavey <email@hidden>)
 >Re: portable app (From: Ariel Feinerman <email@hidden>)

  • Prev by Date: Is there any other way of enumerating windows and getting their positions except Accessibility API?
  • Next by Date: Hitting Layers
  • Previous by thread: Re: portable app
  • Next by thread: Re: portable app
  • Index(es):
    • Date
    • Thread