No APNS startup at startup later?

my APNS notification works great, but I noticed strange behavior that I would like to ask for confirmation.

I retrieve notification service information either during "didFinishLaunchingWithOptions" or "didReceiveRemoteNotification". In "didFinishLaunchingWithOptions" I check

NSDictionary* userInfo = [launchOptions valueForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"];
NSDictionary *apsInfo = [userInfo objectForKey:@"aps"];

to get the parameters. In "didReceiveRemoteNotification" apsInfo is obtained from NSDictionary * apsInfo = [userInfo objectForKey: @ "aps"];

This works fine, with one exception: if I ignore the pop-up notification and click "Close" instead of "View" and finally launch the application later from the launch bar, there is no more apsInfo. Is it "by design"? Is notification information available only if you click View or launched the application from the notification information dialog box?

Hi

+3
source share
3 answers

. , , "" " ". . . , Apple : " doneFinishLaunchingWithOptions, , launchOptions bla, bla..."

, doneFinishLaunchingWithOptions launchOptions .

: . SDK?

==================================== Apple didFinishLaunchingWithOptions : " , , ".

, , , , ( ). , ? UPDATE ======================================= . , . , , , . APNS , Apple 100% .

-1

, . , , (). , 256 , Apple . , , "". . , ...

-1

, .

  • Push Notification, - , .

  • , ( Push Notification , ), , , , Push Push .

  • If this is the first time the user has opened the application from the moment of sending the Notification, your application reads the relevant data from your server and starts in the state you need.

Just an idea at the moment, but I think it will work. It just depends on whether you should implement it.

-1
source

Source: https://habr.com/ru/post/1727431/


All Articles