Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As said by @jbworld you cannot load dynamic libraries on the iPhone, so this link should be made statically, at compilation time. While reading at the code of spatialite (that's an SQLite extension), I found that kind of invocation:</p> <pre><code>void spatialite_init (int verbose) { /* used when SQLite initializes SpatiaLite via statically linked lib */ sqlite3_auto_extension ((void (*)(void)) init_static_spatialite); } </code></pre> <p>And the <code>init_static_spatialite</code> code:</p> <pre><code>static void init_static_spatialite (sqlite3 * db, char **pzErrMsg, const sqlite3_api_routines * pApi) { SQLITE_EXTENSION_INIT2 (pApi); /* setting the POSIX locale for numeric */ setlocale (LC_NUMERIC, "POSIX"); *pzErrMsg = NULL; sqlite3_create_function (db, "spatialite_version", 0, SQLITE_ANY, 0, fnct_spatialite_version, 0, 0); sqlite3_create_function (db, "proj4_version", 0, SQLITE_ANY, 0, fnct_proj4_version, 0, 0); sqlite3_create_function (db, "geos_version", 0, SQLITE_ANY, 0, fnct_geos_version, 0, 0); sqlite3_create_function (db, "GeometryConstraints", 3, SQLITE_ANY, 0, fnct_GeometryConstraints, 0, 0); sqlite3_create_function (db, "CheckSpatialMetaData", 0, SQLITE_ANY, 0, fnct_CheckSpatialMetaData, 0, 0); ... </code></pre> <p>So it looks like if the <code>sqlite_auto_extension</code> enables you to statically link an extension. <a href="http://www.sqlite.org/c3ref/auto_extension.html" rel="nofollow noreferrer">The documentation</a> seems to confirm that:</p> <blockquote> <p>“This API can be invoked at program startup in order to register one or more statically linked extensions that will be available to all new database connections.”</p> </blockquote> <p>Then, at runtime, for spatialite, I just have to invoke the <code>spatialite_init(0)</code> to get the extension up and running.</p> <h2>Invoke such method <em>before</em> loading any sqlite DB.</h2> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload