diff --git a/MusicPlayer/MP/Common/Base(公用基类)/Controllers/MP_LunchViewController.swift b/MusicPlayer/MP/Common/Base(公用基类)/Controllers/MP_LunchViewController.swift index 9dce3b6..0fd8ced 100644 --- a/MusicPlayer/MP/Common/Base(公用基类)/Controllers/MP_LunchViewController.swift +++ b/MusicPlayer/MP/Common/Base(公用基类)/Controllers/MP_LunchViewController.swift @@ -31,6 +31,28 @@ class MP_LunchViewController: UIViewController { timer.add(to: RunLoop.current, forMode: .common) //获取idfa _ = requestTrackingAuthorization(self) + +#if DEBUG + self.completionBlock = { + DispatchQueue.main.async { + [weak self] in + guard let self = self else {return} + //停止计时器 + timer.isPaused = true + //加载完毕,判断并跳转 + accessAppdelegate.switch_positive() + } + } +#else + chekStatus() + +#endif + //启动计时器 + timer.isPaused = false + } + + //检测status状态 + func chekStatus() { MP_AnalyticsManager.shared.getOpenStatus { [weak self] open in guard let self = self else {return} if open { @@ -79,9 +101,9 @@ class MP_LunchViewController: UIViewController { } } } - //启动计时器 - timer.isPaused = false } + + deinit { //销毁计时器 timer.invalidate()