HomePhabricator
Diffusion Comm 9d9a441f5ea3

Add getter and setter for integers, getter for all keys and function to remove…

Description

Add getter and setter for integers, getter for all keys and function to remove subset of keys to MMKV

Summary: This differential extends MMKV API with integer getter and setter, function to retrieve all keys in the db and function to remove subset of keys from the db.

Test Plan:
iOS:

  1. Below the comm::CommMMKV::initialize() line add lines that set several different integers under different keys.
  2. In NotificationService.mm at the beginning add lines that:
    1. Get all keys.
    2. Tries to get value for each key.
  3. Then call remove with one-element array with one key.
  4. Get all keys again and log them.
  5. Send notification and check that all integers are logged and the set of keys logged doesn't contain the one passed to removeKeys.

Android:

  1. Below the CommMMKV.initialize() line add lines that set several different integers under different keys.
  2. In CommNotificationsHandler.java at the beginning add lines that:
    1. Get all keys.
    2. Tries to get value for each key.
  3. Then call remove with one-element array with one key.
  4. Get all keys again and log them.
  5. Send notification and check that all integers are logged and the set of keys logged doesn't contain the one passed to removeKeys.

Reviewers: tomek, bartek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11047

Details

Provenance
marcinAuthored on Feb 12 2024, 5:53 AM
Reviewer
tomek
Differential Revision
D11047: Add getter and setter for integers, getter for all keys and function to remove subset of keys to MMKV
Parents
rCOMM1c15cd25b111: Introduce MMKV to Android app
Branches
Unknown
Tags
Unknown