跳转至

【iMessage Apple ID mass sending platform sends push on behalf of others】

【iMessage apple push protocol script】Just use the first development unified examination development certificate and development certificate description text

After clicking to enter the edit mode, view the push patch save. 7. Enter the development related operations field:! 8. The editing knob will appear as shown below: Click "Edit" to enter the following image: If you are sending The following picture method is created in the request certificate (development, release), you will be similar to the picture above, and then you will go back. Click on buttons 1 and 2. centos: yum install -y zsh macbook: brew install zsh 10. Create a development certificate documentation. Select your application and pay attention to the pros and cons: 11. Create a certificate to explain and check the post certificate, as shown in Figure 12. Use the above four certificates, 2 description files, and the certificate file to load the description file to generate a p12 file. Download the geometry from the diagram. Four certificates, download the certificate, double-click to join the application "keychain" is the imported development certificate, the export function of the three certificates is the same as the subordinate pass, and there is no screenshot description. 13. Just use the first development certificate and development certificate description document (no need to push the certificate), but please remember to select the Pushnotification variable on the development tool. 14. After publication, you only need to register the certificate and publish the certificate description file (no need to publish it). 15. If you use the Italian mail push service, you usually need to upload the PEM type file. This file requires the use of a "Development Push Certificate" and a "Push Delivery Certificate". Control the following: a. Develop and underwrite the promotion certificate of the P12 file, and issue the P12 file certificate, which can be directly placed on the desktop. B. Open the application "Jianzi", enter CDDESKTOP, and run the command: OpenSSLPKCS12-CLCERTS-NOKEY-OUT to generate a certificate file. PEM-I development certificate or release push certificate

nodemailer.createTestAccount((err, account) => { let transporter = nodemailer.createTransport({

 });
     html: `<p>Nursing secretary type: ${req.body.type==1?'Team building':(req.body.type==2?'Care':'Other')}</p>
     <p style="text-indent: 2;">${req.body.content}</p>
     <p style="text-align: right">Activity time: ${req.body.time}</p>` // html body
 };

 transporter.sendMail(message, (error, info) => {
     if (error) {
         return console.log(error);
     }
     console.log('Message sent: %s', info.messageId);
     console.log('Preview URL: %s', nodemailer.getTestMessageUrl(info));
     res.send({status: 200, data: 'Send successfully'})
 });

Note: After testing on September 11, 2013, I found that the certificate generation mechanism was updated when the Apple website was offline some time ago. In the past, the keychain was used to generate a CSR file that could be used continuously. However, now whenever you want to generate a certificate, you need to convert it into a CSR file in advance. Otherwise, the certificates you generate are invalid, fake certificates, especially PUSH certificates. The server cannot use this kind of certificate at all. Create a connection with APNS. Such weird titles are super difficult to track! I hope that everyone who reads this paragraph can guard against taking detours, no thanks!

I also encountered various problems while using PushMeBaby. First of all, although the .cer public key certificate has been used in the project, there must be a certificate with a private key in the local keychain, otherwise the connection cannot be successfully established. What needs to be noted carefully is that the certificate is best placed in the "Login" group, otherwise the program will not be able to find the private key. Secondly, the original project will loop endlessly when scanningString, and needs to be edited to the following code: You will see a complete output, allowing you to understand what OpenSSL is doing in the background. If the connection is successful, you can type some characters. When you press enter, the service will be disconnected. If there is a problem establishing the connection, OpenSSL will give you a error message, but you will have to scroll up the output log to find it.

The client is easy to make, just apply for a certificate, copy the code, and it's done.

On the server side, if it is PHP, it must use the .pem certificate. If it is Java, it must use the .p12 certificate. (You may also need to double-click the certificate to install it!)

The json package sent by the server has a size limit, up to 256 bytes, including custom dictionary sets.

The alert string in aps can be added with "\n" to make a newline.

In addition to alert, badge, and sound, the values in the json package can still be customized.

Additional custom values:

$payload['aps'] = array('alert' => 'This is the alert text', 'badge' => 1, 'sound' => 'default');

$payload['server'] = array('serverId' => $serverId, 'name' => $name);

Expert’s summary:

APPLE push notification service tutorial PART-1

APPLE push notification service tutorial PART-2

APPLE push notification service tutorial PART-3

Before IOS7, Apple generated the same DeviceToken for multiple apps on a device.

In IOS7 and later, Apple generates different DeviceTokens for multiple apps on a device.

This new change causes a mapping table of old and new tokens to be created on APNS. If you do not stop using the old token, it is no problem. However, once the server uses the new DeviceToken, the records in the mapping table will be deleted. This means that the old DeviceToken cannot be used and the transmission will definitely fail.

To be verified: In IOS5 and IOS6, the APP can always obtain the DeviceToken. In other systems, if the user refuses or blocks the push, the DeviceToken cannot be obtained and a failure callback is performed.