As I mentioned in my initial response, the Encrypted Core Data project you reference is separate from SQLCipher (although it does internally use SQLCipher). Because of this, we don’t have recommendations on how to upgrade from SQLCipher 3 to SQLCipher 4 using Encrypted Core Data. You may try asking the Encrypted Core Data project where the appropriate place to do cipher_migrate may be.
Where should we use PRAGMA key = ‘’ & PRAGMA cipher_migrate exactly in Objective C.
PRAGMA key needs to be before PRAGMA cipher_migrate. There’s an example of it in our API documentation: SQLCipher API - Zetetic
Typically the flow is: attempt to open the database, if it fails, attempt to migrate, if that fails then the key material is incorrect.
My colleague @sjlombardo gave further details in his response here: Upgrading to SQLCipher 4 - #17 by sjlombardo
Can you please share some example.
We don’t provide publicly available examples for community edition SQLCipher users aside from the API documentation I linked above, and the standard integration examples on this page: SQLCipher Community Edition - iOS and macOS Tutorial - Zetetic
It sounds as if your organization may rely on SQLCipher. You might consider purchasing a commercial license to the software, which will include access to private, prioritized support.