iphone Launch Options

后端 未结 6 1100
刺人心
刺人心 2020-12-17 00:38

im not getting any launch options after a push notification; heres the code i have but non of the NSLogs seem to print in the debug area.

UILocalNotification         


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 00:43

    The answers given above are correct. I largely use the following snippet in my application:didFinishLaunchingWithOptions:

    if let remoteNotifPayload = launchOptions?[UIApplicationLaunchOptionsKey.remoteNotification] as? [AnyHashable: Any] {
            notificationsController.didReceiveRemoteNotification(with: remoteNotifPayload)
        }
    

提交回复
热议问题