It looks like you're new here. If you want to get involved, click one of these buttons!
*callFile* stack NOT ok begin:1 end:2 delta:-1
NSPersistentStore *newStore =
const char* g_pathForFile(const char* filename)
const char* pathForFile(const char* filename);
Maybe you forget a lua_pop? But I cannot predict the main crashing reason.
To get a full path of a file (e.g. "|D|caroline.sqlite") you can add this function to your project:......Lua codes are executed on main thread always)
(I don't think that a basic UIKit plugin example would cover this question.)
I've worked out how to create a simple Core Data database in Objective C code so you don't have to set it up through the Xcode xdatamodel, but I'm having trouble creating a Persistent Store (that's where the database actually gets created on disk).
I get this message:
(This is inside the plugin, so creating a plist in the plugin works.)
Does that message mean anything to you? And why would this line change the Lua stack when the plugin's not even talking to Lua at that precise moment?
My url is created from this string (and I have checked the directories exist and the file doesn't):
Oh, maybe it's threading? I guess I have to do Core Data on the main thread, so it may not be possible to do this at all?
To get a full path of a file (e.g. "|D|caroline.sqlite") you can add this function to your project:
This function will return the correct full path of the file at documents folder.
(Side note: Although rendering is done on a different thread, Lua codes are executed on main thread always)
Or is that |R| for resources?
(By assets, I mean the app's sqlite database, which I don't want the end user to touch)