Cannot open encrypted database with SQLCipher 4

@jdleung

This is the culprit. If you look at their pod spec, they are linking sqlite3.

If both SQLCipher and a standard version of SQLite are linked, this can lead to undefined behavior.

Our recommendation would be to remove any other pods that depend on SQLite.

Alternatively, there is some guidance in these posts on how to ensure SQLCipher is preferred when linking:

Note: This is considered unsupported

Specifically in your scenario, since you’re using cocoa pods with use_frameworks you’ll want to put this as the first item in your target’s Build Settings > Other Linker Flags: -framework SQLCipher as recommended in the second post. We’d also recommend following the guidance in that second post related to ensuring that SQLCipher is properly linked at runtime.