mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
new: watchOS watch end app
This commit is contained in:
20
ios/WatchApp/Store.swift
Normal file
20
ios/WatchApp/Store.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Store.swift
|
||||
// WatchEnd Watch App
|
||||
//
|
||||
// Created by lolli on 2023/9/16.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class Store {
|
||||
static let defaults = UserDefaults.standard
|
||||
|
||||
static let _ctxKey = "ctx"
|
||||
static func getCtx() -> [String: Any] {
|
||||
return defaults.object(forKey: _ctxKey) as? [String: Any] ?? [:]
|
||||
}
|
||||
static func setCtx(_ ctx: [String: Any]) {
|
||||
defaults.set(ctx, forKey: _ctxKey)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user