I create swift project. add SpatialDBKit pod and some other lib.
When i try to open database with
let db = SpatialDatabase(path: NSBundle.mainBundle().pathForResource("myfile", ofType: "spatialite") )
I get EXC_BAD_ACCESS (code=1,address=0x300)
spatialite_init (int verbose)
{
/* used when SQLite initializes as an ordinary lib
OBSOLETE - strongly discuraged !!!!!
*/
#ifndef OMIT_GEOS /* initializing GEOS */
initGEOS (geos_warning, geos_error);
#endif /* end GEOS */
sqlite3_auto_extension ((void (*)(void)) init_spatialite_extension);
spatialite_splash_screen (verbose);
}
at sqlite3_auto_extension method call.
Please note that i open it with FMDB without any issue.
UPDATE:
I found that i have issue pod. when copy file directly from github and replace, issue fixed!
I see that pod has issue.
see https://github.com/andreacremaschi/SpatialDBKit/issues/21
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.