clearStorage

Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { clearStorage } from '@ray-js/ray';

// Promise usage
try {
  const res = await clearStorage();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
clearStorage(params: )
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.2.0

Description

Clear local data cache

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { clearStorage } from '@ray-js/ray'

// Clear local data cache
clearStorage({
  success: () => console.log("Local cache cleared"),
  fail: error => console.error(error),
});