How can I tell my app is launched via BGAppRefreshTask/BGProcessTask?

I need to know if my app is launched via BGAppRefreshTask/BGProcessTask in UIApplicationDelegate's application:didFinishLaunchingWithOptions: method, but the launchOptions didn't contain any key about this.

A workaround is to check if UIApplication sharedApplication].applicationState == UIApplicationStateBackground in application:didFinishLaunchingWithOptions:, but it cannot tell launch via BGTask part from launch via other methods like silent push.

How can I tell my app is launched via BGAppRefreshTask/BGProcessTask?
 
 
Q