4

Does anyone have and is willing to share a working example of using Akavache in a Xamarin.iOS project (ideally without any other add on ui frameworks, as bare bones as possible) implementing a custom EncryptionProvider so that the Secure cache is actually encrypted.

To clarify, I would like the example to show the following:

  • use of Xamarin.iOS to build a simple iOS app
  • use of Akavache to cache data
  • use of Akavache's BlobCache.Secure or SQLiteEncryptedBlobCache with a custom EncryptionProvider implementation to keep the cached data encrypted when data is at rest

Thanks for your help.

Conclusion:

With the help of the example below I got my test solution working and am sharing it here for anyone that it might help in the future: https://github.com/dmitrysamuylov/xamarin-ios-akavache-secure-example

Community
  • 1
  • 1
Dmitry Samuylov
  • 1,454
  • 2
  • 14
  • 35
  • http://kent-boogaart.com/blog/password-protected-encryption-provider-for-akavache – Geoffrey Huntley Sep 07 '17 at 20:48
  • @GeoffreyHuntley thank you but that is not a working example, that's a code snippet which I tried implementing and has not worked for me, that is why i would like to see a fully working example solution of the custom implementation working. My issues with the implementation in that blog post are documented here: https://stackoverflow.com/questions/46084391/xamarin-ios-akavache-encrypted-cache-with-custom-encryptionprovider – Dmitry Samuylov Sep 08 '17 at 12:05
  • 1
    I tested out the code from the blog here https://github.com/PureWeen/Akavache.Samples and it seems to work ok – Shane Neuville Sep 11 '17 at 00:52
  • 1
    @ShaneNeuville Thank you very much, i did try your example and it did seem to work. I'm going to use it as a reference in trying to figure out what I am doing wrong that's causing my implementation to not work. – Dmitry Samuylov Sep 11 '17 at 12:48

1 Answers1

5

Link to the sample I created

https://github.com/PureWeen/Akavache.Samples

I realize link only answers are usually frowned upon but I don't know if anyone wants my whole sample pasted into an answer :-)

Shane Neuville
  • 2,037
  • 13
  • 17
  • 1
    I think your sample is very helpful, I was in the process of putting my own example together that is a little more involved, when i get it working I'll post it as well. I wish there was a sample folder in the Akavache repo demonstrating some things like this for example. – Dmitry Samuylov Sep 11 '17 at 19:06
  • 1
    Agreed there are definitely some use cases and quirks with Akavache that would be good to have samples around for... Like creating your own Cache and just staying away from the Static ones :-) I created this sample with the intent of growing it as these cases come around and maybe it'll find a home into the main repo!! – Shane Neuville Sep 11 '17 at 22:43