Recently the project intends to do push function, the last choice of Friends Alliance push, integration of the Friend League SDK, very convenient.
The first step:
First login to Friends union official website, the Registered Friend Alliance account
Then select the message push module (because the project only does push)
Part II:
Add apps: Two apps for iOS and Android, select iOS client, complete information
Complete the following information: This step is to get the Appkey and app name to stay consistent with the project you do.
Click Submit and get Appkey.
The Appkye of each project is unique and integrates the Appkey into the project when the SDK is integrated.
Next, set up a push certificate for the message, you can refer to the friend's Certificate Setup Guide is very detailed. I set up the following certificate:
The certificate is as follows:
At this point the certificate is set up and uploaded to the friend League
Then click Add App and the app is created.
Part III:
Download the Friends League SDK, integrate into the project, see the League of Friends Integration documentation, very detailed.
First get device_token, each cell phone Device_token is different, the acquisition Device_token added to the Friends union official website Test equipment, Device_token is the marking of testing equipment.
The code to get Device_token is as follows:
If the above settings are not a problem, you can send your mobile phone message in the backstage of Friends Union.
Push message for everyone, some people, unicast, some people can be tagged, unicast is able to verify that you set the certificate is not correct, the menu broadcast must be added device_token; some people must select the label push (write first to this) followed by the tagging.
Friend Alliance message push (i)