Recently, I described how to use SQLCipher with Zumero to encrypt your locally-synched DBfiles. That was all fine, except:
- This was before the advent of Zumero for SQL Server.
- The ZSS framework includes a stripped-down, synch-only object model, allowing you to use your iOS SQLite wrapper of choice (I choose FMDB)
- There’s a lot of “install this”, “drag this to that”, “install the other thing”… Tedious to describe, tedious to follow.
How do we combine all the pieces? Head to your XCode iOS project’s folder, and make sure you have a
Podfile. In that Podfile, mention Zumero and FMDB, using the SQLCipher variants of both pods:
platform :ios, '7.0' pod 'ZumeroSync/SQLCipher' pod 'FMDB/SQLCipher'
No need to specify SQLCipher itself — it’s already noted as a dependency in both the Zumero and FMDB pods.
pod install (or
pod update if other pods are already in place):
$ pod install Analyzing dependencies Downloading dependencies Installing FMDB (2.1) Installing SQLCipher (2.1.1) Installing ZumeroSync (220.127.116.116) Generating Pods project Integrating client project [!] From now on use `EncryptedDBApp.xcworkspace`.
Do as the nice program says, and open the workspace it’s created for you.
Include paths are all taken care of:
As for actually using the three?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Easy to blog, easy to follow.