Databases on iOS?

Hi,
I know Xojo for iOS is not released, but I am asking in general:

A normal desktop app can for example create and then parse / write to a database file in the application support directory.
How does this work on iOS? Is it the same - the app creates the database file somewhere on the device, or is this done differently on iOS?

Thanks.

I don’t know all the details but I know that a lot of iOS apps use SQLite databases for storing things. Not sure of the path names and most important from my end - how to get an already existing database copied over to the phone! But I am sure it will all be explained once the IOS framework is released.

iOS has similar notions as Application Support but slightly more sandboxed so each app can’t just grab other apps data

So is there a way to copy or ftp an existing database from a desktop app to the phone? Or would you need to do something like transferring it via JSON and an HTTP get?

I’m just trying to get an idea for how I would copy an existing database file to the phone…

Probably not FTP since the phone isn’t a server and I don’t believe it has an FTP client natively
HTTP get might work to be able to download one.
Certainly creating it on first launch & populating with data from whatever source would work.

Thank you so much guys :slight_smile:
I was just curious for future reference, if iOS could write database files to the device, or wether there was some totally foreign way of achieving this.

Much appreciated!

iOS can create sqlite databases easily, Xcode even can as part of the project template AFAIR.

I’ve seen some apps use Dropbox to move data from an iOS app to a Desktop app etc, you just use your credentials in the iOS setup and let it do its thing.

I did look at doing that with an Obj-C app I wrote some years back using some API stuff (Can’t recall from Dropbox itself or a third-party library). The requirement went away about half way through.

[quote=137192:@Jon Ogden]So is there a way to copy or ftp an existing database from a desktop app to the phone? Or would you need to do something like transferring it via JSON and an HTTP get?

I’m just trying to get an idea for how I would copy an existing database file to the phone…[/quote]

iOS apps can move files back and forth through iTunes. It should be possible to set your app do it that way.

[quote=137195:@Norman Palardy]Probably not FTP since the phone isn’t a server and I don’t believe it has an FTP client natively
HTTP get might work to be able to download one.
Certainly creating it on first launch & populating with data from whatever source would work.[/quote]

OK. Yeah, I’ll probably have to set up a port on the desktop app and listen there for the iOS app to connect. Then the desktop app can dump the data down to the database and populate it. Kind of a pain but it should work…