We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在applicationWillResignActive时保存数据,后在 applicationDidBecomeActive 读取数据,读取不出来
Swift
v1.0.19
iOS
Cocoapods
private let OPBShowAppLockTimeKey = "OPBShowAppLockTimeKey"
1:首先程序进入applicationWillResignActive
func __saveAppResignActiveTime() { let currentTime = Date().timeIntervalSince1970 MMKV.default().set(currentTime, forKey: OPBShowAppLockTimeKey) MMKV.default().sync() }
2:当程序进入applicationDidBecomeActive
func __getAppDidBecomectiveTime() -> TimeInterval { let ss = MMKV.default().double(forKey: OPBShowAppLockTimeKey) return ss }
问题是 在调用__getAppDidBecomectiveTime 方法时,获取存不到已存入的信息。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
ok,i will upgading the mmkv. thanks! see you later!
No branches or pull requests
Note:
在applicationWillResignActive时保存数据,后在 applicationDidBecomeActive 读取数据,读取不出来
The language of MMKV
The version of MMKV
The platform of MMKV
The installation of MMKV
What's the issue?
private let OPBShowAppLockTimeKey = "OPBShowAppLockTimeKey"
1:首先程序进入applicationWillResignActive
2:当程序进入applicationDidBecomeActive
问题是
在调用__getAppDidBecomectiveTime 方法时,获取存不到已存入的信息。
The text was updated successfully, but these errors were encountered: