| | |
| | | } |
| | | |
| | | func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { |
| | | |
| | | if URLContexts.first!.url.host == "resendContextReqByScheme"{ |
| | | WXApi.handleOpen(URLContexts.first!.url, delegate: self) |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | UserDefaults.standard.synchronize() |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |
| | | }else{ |
| | | UserDefaults.standard.set(Date().timeIntervalSince1970, forKey: "scheduledTimer") |
| | | UserDefaults.standard.synchronize() |
| | | } |
| | | } |
| | | timer?.fire() |
| | |
| | | func suspendTimer(){ |
| | | timer?.fireDate = .distantFuture |
| | | timer = nil |
| | | UserDefaults.standard.set(nil, forKey: "scheduledTimer") |
| | | UserDefaults.standard.synchronize() |
| | | } |
| | | } |
| | | |