|
@@ -23,34 +23,34 @@ class UpdateVersionManager: NSObject {
|
|
|
|
|
|
|
|
|
func initUpdateVersionManager() {
|
|
|
-
|
|
|
- observe = NotificationCenter.default.addObserver(forName: UIApplication.didFinishLaunchingNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
- [weak self] (notification) in
|
|
|
- self?.configUpGrade()
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- observe = NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
- [weak self] (notification) in
|
|
|
- if self?.updateVersionView != nil {
|
|
|
- self?.updateVersionView?.hide()
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- observe = NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
- [weak self] (notification) in
|
|
|
- self?.configUpGrade()
|
|
|
-
|
|
|
- SwiftMoyaNetWorkServiceConfig.shared().configApi(completion: {(data) -> (Void) in}){_ in}
|
|
|
- })
|
|
|
-
|
|
|
- observe = NotificationCenter.default.addObserver(forName: UIApplication.willTerminateNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
- [weak self] (notification) in
|
|
|
- if self?.updateVersionView != nil {
|
|
|
- self?.updateVersionView?.hide()
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ observe = NotificationCenter.default.addObserver(forName: UIApplication.didFinishLaunchingNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
+ [weak self] (notification) in
|
|
|
+ self?.configUpGrade()
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ observe = NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
+ [weak self] (notification) in
|
|
|
+ if self?.updateVersionView != nil {
|
|
|
+ self?.updateVersionView?.hide()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ observe = NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
+ [weak self] (notification) in
|
|
|
+ self?.configUpGrade()
|
|
|
+
|
|
|
+ SwiftMoyaNetWorkServiceConfig.shared().configApi(completion: {(data) -> (Void) in}){_ in}
|
|
|
+ })
|
|
|
+
|
|
|
+ observe = NotificationCenter.default.addObserver(forName: UIApplication.willTerminateNotification, object: nil, queue: OperationQueue.main, using: {
|
|
|
+ [weak self] (notification) in
|
|
|
+ if self?.updateVersionView != nil {
|
|
|
+ self?.updateVersionView?.hide()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
|
|
|
func systemVersion(below aVersionString: String) -> Bool
|