iphone Launch Options

后端 未结 6 1096
刺人心
刺人心 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:55

    an error spotted:

    NSDictionary *remoteNotif = [launchOptions objectForKey:   
                                  UIApplicationLaunchOptionsRemoteNotificationKey];
    

    If you want to receive the remote notification, NSDictionary should be used not UILocalNotification

    The remote notification is a payload, containing arguments, not a local notification. You might want to look at this url question:

    Crash when handling remote notification when app not running

    If you want to do local notification, change it like Ludovic's suggestion

提交回复
热议问题