Open app in specific view when user taps on push notification with iOS Swift

后端 未结 3 991
挽巷
挽巷 2020-12-13 01:09

My app allows remote push notifications to a user. How do I enable it to be opened in a specific view controller when the user taps on the push notification? I want the app

3条回答
  •  遥遥无期
    2020-12-13 01:36

    In the AppDelegate, you will get a delegate callback "didFinishLoading" or "didReceivePushNotification" methods (based on your app is in background or foreground). In that method get the top most view controller's instance, then create the specific view controller that you want to show and present/push from top most view controller.

提交回复
热议问题