new: watchOS watch end app

This commit is contained in:
lollipopkit
2023-09-16 17:53:34 +08:00
parent f74c5cd9ba
commit ef880c67af
5 changed files with 466 additions and 0 deletions

20
ios/WatchApp/Store.swift Normal file
View 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)
}
}