ios: detect app was started by tapping message in notification center

前端 未结 3 2110
失恋的感觉
失恋的感觉 2021-01-26 12:38

Is there a way to know if the app was started by tapping message in notification center?

I want to make some calls to server only if the app is started by tapping on a m

3条回答
  •  长发绾君心
    2021-01-26 12:55

    In - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method of the application delegate, you will receive the notification information in the launchOptions dictionary. That way you could get to know that the app was launched from the notification tray.

提交回复
热议问题