I have a desktop application with SQLite database. Now i planned to make it iOS app. How can i copy the database from desktop app to iOS app.
Take a look to this : https://stackoverflow.com/questions/5424330/any-way-to-get-your-sqlite-db-off-iphone
That works to copy from iOS to the Desktop, but not the other way around.
The only way I have found to do this is to activate iTunes Filesharing in the app, and move the database that way
how would that get the database into the sandbox of the iOS app?
unless the app had all the required interface code to deal directly with dropbox?
You download it from the web service and put it in the documents folder? Your app is allowed to save files no problem.
Yes, but doesn’t your app need to have a UI to control all that?
ie. The app has to log in to Dropbox, select the file, download it, then of course, somehow the user needs to insure that the app knows which file (either by a specific name, or a file selection).
What I am inferring is that the OP wants’ to “seed” his app, in which he already has a database on his desktop, and he wants to load it once onto his iOS device…
If in fact, he wants a method to continually move/copy/synch files between iOS and Desktop then that is a whole nother kettle of fish
If you just need to copy the file to your iOS app during development, you can add the file in a copy file build step in Xojo.
…and then copy it to
SpecialFolder.Documents in your iOS
App.Open event if you want to be able to update records like I’m doing right now with my iOS App. If it is read only then you can omit that step. See documentation here: