From b173424507dcf632d51311bc74ad1b543caaaf08 Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 26 Jan 2024 13:35:13 +0900 Subject: [PATCH] Refactor interface names for MiniApp Preference --- js-miniapp-bridge/src/modules/miniapp-preferences.ts | 6 +++--- js-miniapp-sdk/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js-miniapp-bridge/src/modules/miniapp-preferences.ts b/js-miniapp-bridge/src/modules/miniapp-preferences.ts index dadecfa9..f6288f02 100644 --- a/js-miniapp-bridge/src/modules/miniapp-preferences.ts +++ b/js-miniapp-bridge/src/modules/miniapp-preferences.ts @@ -19,7 +19,7 @@ export class MiniAppPreferences { set(key: string, value: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'setPreference', + 'setMiniAppPreference', { preferenceKey: key, preferenceValue: value }, response => { resolve(MiniAppBridgeUtils.BooleanValue(response)); @@ -37,7 +37,7 @@ export class MiniAppPreferences { get(key: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'getPreference', + 'getMiniAppPreference', { preferenceKey: key }, response => { resolve(response); @@ -55,7 +55,7 @@ export class MiniAppPreferences { remove(key: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'getPreference', + 'removeMiniAppPreference', { preferenceKey: key }, response => { resolve(MiniAppBridgeUtils.BooleanValue(response)); diff --git a/js-miniapp-sdk/README.md b/js-miniapp-sdk/README.md index dd1746b4..befb0e3d 100644 --- a/js-miniapp-sdk/README.md +++ b/js-miniapp-sdk/README.md @@ -1228,7 +1228,7 @@ import MiniApp from 'js-miniapp-sdk'; ## MiniApp storage using Key/Value Available from v1.20.0 -[Secure storage](#secure-storage) uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data. +We already have a [Secure storage](#secure-storage) that uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data. If MiniApp wants to use any storage that is lightweight, then they can use the following interfaces. Android uses Shared Preferences and iOS uses UserDefaults for the interfaces below,