0

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!

Hamid
  • 1,099
  • 3
  • 22
  • 37
  • Have you added sqlite3 to your frameworks? – Maysam Sep 05 '15 at 14:05
  • yes, but i have issue with spatialite and not sqlite. also app crash at sqlite3_auto_extension, means sqlite init successfully and try to init spatialite extention – Hamid Sep 05 '15 at 14:35
  • I am struggling to integrate SpatialiteDBKit with my swift project. Would it be possible for you to share with me a working demo project or help me? – Burhanuddin Sunelwala Aug 30 '16 at 08:54

1 Answers1

0

I see that pod has issue.

see https://github.com/andreacremaschi/SpatialDBKit/issues/21

Hamid
  • 1,099
  • 3
  • 22
  • 37