dispatch_source_create, dispatch_resume and dispatch_suspend
으로 GCD를 통해 타이머를 만들고 관리하는 경우 모든 dispatch_suspend에 항상 dispatch_resume
이 있어야한다는 것을 항상 알고 있어야한다는 것을 알고 있습니다.강제로 앱을 종료 할 때 dispatch_resume 및 dispatch_suspend를 페어링
응용 프로그램이 백그라운드 모드로 들어갈 때 dispatch_suspend를 호출하고 applicationDidBecomeActive
을 받으면 이전에 일시 중단 된 타이머 소스에 dispatch_resume
을 호출합니다.
응용 프로그램이 강제 종료 될 때 (백그라운드에서 실행되는 앱 목록 가져 오기를 통해) dispatch_resume
은 어떨까요? 모든 것에 대해 걱정해야합니까? 나는 앱이 다시 시작될 때 앱이 깨끗하게 시작하는 것처럼 application:didFinishLaunchingWithOptions
이 호출된다고 추정합니다.이 가정은 맞습니까?