getStoreData
Description
$app.setStoreData()로 영구 저장된 값을 읽습니다. 값이 없으면 null을 반환합니다.
Parameters
| 파라미터 | 타입 | 설명 |
|---|---|---|
| key | String | 조회할 데이터의 키 이름 |
Returns
dynamic — 저장된 값. 없으면 null
Notes
- 디스크(
LucyStorage)에서 읽으므로getSharedData보다 상대적으로 느립니다. - 앱을 재시작해도 값이 유지됩니다.
Example
// 앱 시작 시 저장된 테마 모드 복원
var themeMode = $app.getStoreData("THEME_MODE");
if (themeMode != null) {
$app.changeTheme(Number(themeMode));
}
Related
$app.setStoreData(key, data)$app.removeStoreData(key)$app.getSharedData(sharedKey)