Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Jun 23, 2018 2:22 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Sandboxing SQLite database possible corruption :(
PostPosted: Mon Dec 10, 2012 10:27 am 
Offline
User avatar

Joined: Mon Dec 11, 2006 12:25 pm
Posts: 73
Is this the best advice for dealing with databases with the new OS X sandboxing?

Quote:
For read-write databases, you can use "PRAGMA journal_mode = MEMORY;" instead. The journal files will be created in memory. However, be aware that the database will probably get corrupted in case of power outage.
- from http://support.realsoftware.com/listarc ... 00635.html

Seems like corruption is a pretty poor tradeoff.

_________________
http://www.catamount.com
PocketMoney for iOS, OSX, Linux, Windows, and Android
Realbasic developer chat ##rb on irc.freenode.net


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing SQLite database possible corruption :(
PostPosted: Mon Dec 10, 2012 1:46 pm 
Offline
User avatar

Joined: Mon Dec 11, 2006 12:25 pm
Posts: 73
So Apple says the above is a bad solution.

If you have access to developer forums...
https://devforums.apple.com/thread/1130 ... 0&tstart=0

They want you to user file (document) wrapper (NSDocument).

_________________
http://www.catamount.com
PocketMoney for iOS, OSX, Linux, Windows, and Android
Realbasic developer chat ##rb on irc.freenode.net


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing SQLite database possible corruption :(
PostPosted: Thu Dec 13, 2012 2:58 pm 
Offline
User avatar

Joined: Mon Dec 11, 2006 12:25 pm
Posts: 73
I posted FileWrapper Example that creates/opens/converts custom document packages.

Any folder with .filewrapper will be presented to user as a document package (a single file like .app folders).

It includes converting an existing database.sql file to the document package format.

This does work around the issue of SQLite -journal files when you have a sandbox app you need to submit to Mac AppStore.

Now I just have to integrate it all with my app.

_________________
http://www.catamount.com
PocketMoney for iOS, OSX, Linux, Windows, and Android
Realbasic developer chat ##rb on irc.freenode.net


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group