[MonoTouch] Two problem publish app in AppStore with sqlite database

Nic Wise nicw at fastchicken.co.nz
Tue Dec 20 04:24:49 EST 2011


On Mon, Dec 19, 2011 at 18:28, fsantanac <fsantanac at gmail.com> wrote:
> My first problem is how to get the directory of my db (off line data) (
> https://developer.apple.com/library/ios/#qa/qa1719/_index.html Technical Q&A
> QA1719 ), Apple say for this data:
> Offline Data
> This is data that can be downloaded or otherwise recreated, but that the
> user expects to be reliably available when offline. Offline data should be
> put in the <Application_Home>/Documents directory or in the
> <Application_Home>/Library/Private Documents directory (see QA1699 for
> details) and marked with the "do not backup" attribute. Data stored in
> either location will persist in low-storage situations and the "do not
> backup" attribute will prevent iTunes or iCloud backing up the data. Offline
> data files should be removed as soon as they are no longer needed to avoid
> using unnecessary storage space on the user's device.
> In my directory struct i havent' got this directories.
>
> How get <Application_Home>/Library/Private Documents?
>

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

gets you the /documents folder, so maybe that + "/../Library/Private" ??

There are a load of other Enum's in SpecialFolder, and Miguel has a
good wiki page up on it

http://wiki.ios.xamarin.com/HowTo/Files/HowTo:_Store_Files


> And the second problem is how to
> http://developer.apple.com/library/ios/#qa/qa1699/_index.html prevent files
> from being backed up to iCloud an ITunes . Apple put an example:
> #include <sys/xattr.h>
> - (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
> {
>    const char* filePath = [[URL path] fileSystemRepresentation];
>
>    const char* attrName = "com.apple.MobileBackup";
>    u_int8_t attrValue = 1;
>
>    int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue),
> 0, 0);
>    return result == 0;
> }
>
> How do this in monotouch?

I'll leave that to someone who has a Mac infront of them :)



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2


More information about the MonoTouch mailing list