iOS uses a push to hit the pit

Source: Internet
Author: User

1. The biggest problem is that when the app is turned off, it will not be able to receive offline messages when the app is opened and Android is no problem, only iOS has this problem

WORKAROUND: The background push message content is pushed to the content of the message in the standard JSON format, perfect solution (message format problem)

/** SDK receive a pass-through message callback */

-(void) Getuisdkdidreceivepayloaddata: ( NSData *) Payloaddata andtaskid: (nsstring *) taskId andmsgid: (nsstring *) msgId Andoffline: (BOOL) offLine fromgtappid: (nsstring *) appId {}

Regardless of whether the app is off, or in the background, or running, all of the messages will be recalled here, if you need to save the message content here to handle it.


2. Local Push Save issue

Solution, do not connect with the local push, completely throw away the local push, push is just a reminder, oneself in the program to do the judgment to deal with the save, or you will fall into a bottomless pit, according to push to deal with the logic is to find death.

3. There is a problem directly to see the demo, if there are big problems directly to find customer service

iOS uses a push to hit the pit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.