I keep getting the error not found. Where exactly should it be located? I have tried setting copyfile to all the targets. This code worked on an earlier version built with the first Xojo iOS version.
data is subfolder in the apps directory.
Dim f As FolderItem
f = SpecialFolder.Documents.Child("data/ASPEdata.sqlite")
App.dbASPEData = New iOSSQLiteDatabase
App.dbASPEData.DatabaseFile = f
if Not App.dbASPEData.Connect then
Return False
end
Its the logical place for them. You could then also create a data folder within the documents folder. If you turn on filesharing in itunes you can then access the files from your desktop when you have the iphone/ipad plugged into it.
OK I now have my db in Resources and app.open copies it to Documents. The app seems to run fine, now though I wanted to look at the values in the table and I can’t find the table to make sure everything is written correctly? Where can I find the DB?
You would either have to have written code that can show you whats in that table as part of your application. Or using the instructions I linked to previously follow the instructions on how to copy a file to your ipad with itunes(Second part of instructions on that linked page). You could copy the sqlite database back to your desktop and access it with a dbtool like navicat.
It’s in the bowels of the the system as determined by the iOS Simulator. Your best bet is to display the path to the DB somewhere in your app so you can see the full path.
On my system, I got this path for an iOS app’s Documents folder:
I name my iOS databases something unique and then use Find Any File (by Thomas Tempelmann) to find them in the simulator. As far as I know there’s no magic solution to finding the database on the Mac side.
I usually browse to the Applications folder and then do a search for the file from Applications. The folder in Devices usually will have a modification date of when you last ran the simulator. So its easy to spot. The folder below applications often is not easily identifiable. So I search from there down with the search box.
Btw lefebvre would be replaced by the user you are currently logged in as.