Nick's proposed idea is exactly what I am looking for: "... to separate the custom attributes from the sqlite-net project. Your model project would have a dependency on the new attributes assembly which would be a PCL. sqlite-net would then depend on the same attributes assembly for each specific platform compilation (iOS and Android)."
Please let me know the status of this. Nick you mentioned last March: "This type of change would require changes in the way we prepare and package SQLCipher for Xamarin. We are about to perform additional work in SQLCipher for Xamarin in the near future, so we will take a look at if and how we might allow for this type of customization"
As I understand it, we'd need the SQLite.net equivalent attributes and an Interface that the connection class implements in a PCL.
I am working with an Enterprise client who paid for SQLCipher but is not going to use it because of this issue. Instead this client is building a custom solution by encrypting select fields before storing the data in an unencrypted database.
We went through a great deal of trouble to separate shared code into a PCL library to share between platforms. Data is stored locally in SQLite using SQLite.net as the ORM. Later in the project we got the requirement to encrypt some of the data. I figured it would be easiest just to encrypt the entire database with SQLCipher. Unfortunately, we discovered we need to move the model classes into the platform specific projects (or a Shared project) to allow this to work. Since so much of the shared code depends on the model classes, we'd need to move most of the PCL into a Shared project. We don't want to move the entire PCL into a shared project. This is like a step backwards. Shared projects are quirky in Visual Studio probably since they are relatively new. PCL's have finally become stable and work well.
It's a common practice to put shared code in a PCL when creating Xamarin apps using MvvmCross or Xamarin.Forms. If the SQLite.net attributes and Interface was put in a PCL, it would allow a lot more Xamarin apps to use SQLCipher.
Note: If the SQLite implementation could somehow be "injected" into SQLite.net it would solve this issue elegantly. This would allow the implementation of SQLite vs SQLCipher to be interchanged without changing code that refers to SQLite.net. I am not sure if this is possible. If so it would require changes in SQLite.net also.
Thank You,
Dan