How to detect Remote notification in didFinishLaunchingWithOption application method in objective c?

后端 未结 4 1476
予麋鹿
予麋鹿 2021-01-28 22:34

when app in not in background mode ,inactive mode and app is completely closed. than how to detect is their any notification using application\'s delegate \"didFinishLaunchingWi

4条回答
  •  死守一世寂寞
    2021-01-28 22:56

    You can do this in the didFinishLaunchingWithOption method

     let launchedFromRemoteNotification = launchOptions?[UIApplicationLaunchOptionsRemoteNotificationKey] != nil
    

提交回复
热议问题