Skip to content
Guo Ling edited this page Sep 20, 2018 · 6 revisions

FAQ

  • When should I use MMKV?
    If those scenarios seen familar to you, you should choose MMKV:

    • Your iOS/Android App needs a generic key-value storage;
    • You worry about writing efficency;
    • Inter-process access causing your Android App ANR.
  • Is Swift supported?
    Yes, MMKV is Swift compatible. For detail usage, see demo.

  • Is Kotlin supported?
    Yes, MMKV works perfectly in Java and Kotlin. For detail usage, see demo.

  • What kind of encryption algorithm is MMKV used?
    MMKV uses AES CFB-128 for encryption and decryption, using OpenSSL's implemetation (version 1.1.0i). We choose CFB instead of widely used CBC, mainly because MMKV implements insert/update by append-only operation. Stream encryption algorithms like CFB are more suitable.

  • What're MMKV's limitations?
    MMKV works perfectly well on most case, the size and length of keys and values is unlimited. However, since MMKV caches everything in memory, if the total size is too big (like 100M+), App may receive memory warning. And write speed might slow down when a full write back is needed. We do have a plan to supporting big files, hopefully will come out in next major release.

  • Does MMKV for iOS support multi-process accessing?
    No, MMKV for iOS currently doesn't support mulit-process accessing. Generly speaking, iOS App can't have multi-process running due to OS limitations. Should you have such use case, descript your scenario in issues. We'll consider it if there're huge needs.

  • What is Ashmem MMKV in Android, and when should I use it? Why there's no such thing in MMKV for iOS?
    Ashmem MMKV in Android is a memory-only, inter-process sharing key-value storage. It vanishes when all processes of the App exit. It doesn't use any file as a backing storage. Thus it's suitable for sharing sensitive information among processes of the same App. iOS doesn't have mult-process running in mose case, you could just use any key-value container as you like.

Clone this wiki locally