Skip to content

[iOS] Existing keys intermittently return false/nil after relaunch without CRC or file-length errors #1691

Closed

Description

@wushunyi80-jpg

Environment

  • MMKV: 2.4.0
  • MMKVCore: 2.4.0
  • Integration: CocoaPods
  • iOS: 26.6.2
  • Device: iPhone17,1
  • Mode: MMKV_SINGLE_PROCESS
  • Root directory: application sandbox Documents/mmkv
  • A fixed non-nil cryptKey is used and remains unchanged across app versions.
  • The mmapID is derived from a stable account/tenant identifier.

Problem

We observed an intermittent case where two existing dictionary keys in the same MMKV namespace were both missing after a cold launch:

mmkv.contains(key: keyA) == false
mmkv.dictionary(forKey: keyA) == nil

mmkv.contains(key: keyB) == false
mmkv.dictionary(forKey: keyB) == nil

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions

    👋 Hello! Thanks for opening an issue.

    Note

    New features, bugfixes, updates and other improvements are all handled mostly by @lingol in his free time.
    To support @lingol , please consider 💖 sponsoring him on GitHub 💖.
    Sponsored issues will be prioritized.

    (If you are already a sponsor, thank you! We will get to this shortly.)

  2. lingol commented on Sep 23, 2026

    @lingol
    Collaborator

    That little info is simply impossible to do any investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions