Ios message push, how can I get the message content by clicking icon to enter the program?

  ios, question

When you click on a message to enter the program, you can get the message. However, if you click on the icon, you cannot get the message, so when you enter the message center, the message cannot be displayed.

If you have to,
The following interface can be implemented

  • (void)application:(UIApplication)application didReceiveRemoteNotification:(NSDictionary)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler

Save the value first and read it at startup.

In fact, most of the time, after the app is started, it is easier to go to the server to retrieve the information first.