![]() ![]() Usually we'll use the builder, but the public constructor is really helpful here. Let's first take a look at the default non-encrypted AndroidSettings implementation. But thanks to the abstraction that Android has built into SharedPreferences and Multiplatform Settings' support for saving to the iOS keychain, our work is pretty easy. At first glance, it doesn't look like Multiplatform Settings offers any encrypted storage. There is a Settings interface that is implemented for Android, iOS, MacOS, and JVM platforms. Multiplatform Settings is a solid multiplatform key-value store, created by Touchlab's own Russell Wolf, used extensively at Touchlab, as well as in Jetbrains' KMM Production Sample. Today we'll go over how to store encrypted key-value data with KMP without having to reinvent the wheel. ![]() But if you're creating a mobile app using Kotlin Multiplatform, the KMP solution might not be as clear. This is a solved problem on Android with EncryptedSharedPreferences and iOS with the Keychain Services API. ![]() At some point you will probably need to store a user's auth token on the device, so they won't need to auth whenever they use your app. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |