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

后端 未结 3 994
挽巷
挽巷 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:42

     UILocalNotification *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
        if (notification)
        {
            [self application:application didReceiveRemoteNotification:(NSDictionary*)notification];
        }
    

提交回复
热议问题