iphone Launch Options

后端 未结 6 1107
刺人心
刺人心 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条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 00:54

    Your application receives push notifications through multiple paths, depending on the state of your app when it is received.

    If your app is not launched (not even suspended in background), the launchOptions will contain the notification payload (key UIApplicationLaunchOptionsRemoteNotificationKey).

    If it is already running or suspended in background, the app will receive the notifications via application:didReceiveRemoteNotification: in your application delegate.

    The process is the same for local notifications (UIApplicationLaunchOptionsLocalNotificationKey in application:didFinishLaunchingWithOptions: and application:didReceiveLocalNotification:)

提交回复
热议问题