跳转至

【What is Apple Tweet? What is Apple Push?】

【What is Apple Tweet? What is Apple Push?】How to push information through IMessage on iPhone;

SSL certificate, we put it on the desktop. After double-clicking, you will jump to the keychain access permissions. Our steps in SSL push certificate are the same.

After downloading the configuration certificate four times, select the configuration, click "Detailed AppID", and then click the "Download" button after the program changes. Download, double-click and update the description file on the device (it's best to delete them all and then install them to prevent errors). Open Keykest access with five access keys from the keychain, find our public secret (the name of the key is the public name we filled in. We start generating the CSR request), right click "Exit" on "File Name Export". We are It is called to prompt you to enter the password to encrypt the file. Here, we choose abcabc, of course, you can also choose what it is, but you must remember this password, remember! Then enter the password of the computer and click OK. In this way, We generate a push.p12 file on the desktop. To do this, we have three files on the desktop. One is the CSR request file, the other is the SSL certificate file of APS_DEVELINMENT.CER, and we have just generated a PASH.P12 key. Now Our preparations are complete. Let’s start processing the generated files. We explain why below, as our service link

using UnityEngine;

using System.Collections;

using System.Runtime.InteropServices;

using UnityEngine.UI;

public class Iossdk : MonoBehaviour

{

 // The getIPv6 method is used alone, and setDate and GetDate are used together.

 public InputField[] ips;



 [DllImport("__Internal")]

 // Pass the string parameter to iOS and have a return value. The return value is returned to Unity through the return method of iOS.

 private static extern string getIPv6(string mHost, string mPort)



 [DllImport("__Internal")]

 // Pass string parameters to iOS, no return value, the return value is returned to Unity through the UnitySendMessage method of iOS

 private static extern void setDate(string date);



 [DllImport("__Internal")]

 // Pass int parameters to iOS, no return value, the return value is returned to Unity through the return method of iOS

 private static extern int setMyInt(int date);



 // Pass int parameter to iOS

 public void SetMyInt()

 {

   #if UNITY_IPHONE && !UNITY_EDITOR

       int result = setMyInt(int.Parse(ips[1].text));

       Debug.Log(result);

   #else

       Debug.Log(int.Parse(ips[1].text));

   #endif

 }



 // Pass string parameters to iOS

 public void SetDate()

 {

   #if UNITY_IPHONE && !UNITY_EDITOR

       setDate(ips[0].text);

   #else

       Debug.Log(ips[0].text);

   #endif

 }



 // Take over iOS data

 public void GetDate(string date)

 {

   ips[1].text = date;

   Debug.Log(date);

 }
 // Get IPv6 by host name and port number

 public static string GetIPv6(string mHost, string mPort)

 {

   #if UNITY_IPHONE && !UNITY_EDITOR

       string mIPv6 = getIPv6(mHost, mPort);

       return mIPv6;

   #else

       return mHost + " : " + mPort;

   #endif

 }



 //Program import 1

 public void Click1()

 {

   string s = GetIPv6(ips[0].text, ips[1].text);

   Debug.Log(s);

 }



 // iOS program entry 2

 public void Click2()

 {

   SetDate();

 }



 // iOS program entry 3

 public void Click3()

 {

  SetMyInt();

 }

}

The Apple server is also a certificate, but we directly generate a Windows system (our regular server is a Win system) and it is not clear, so we need to generate a certificate for PEM. The certificate file has a secret. key. Six terminals handle certificates (position: shared à yes à à higher). CD to the desktop, the location of our three files 1, convert the .cer ssl certificate to a .pem file, execute the command: opensslx509-inaps_development.cer-informder-outpushchatcert.pe mecons a pushchatcert.pem file 2, translate the private key push .p12 file to .pem file: opensslpkcs12-nocerts-outpushchatkey.pey.pery.pem-inpush.p12 You need to enter the password, this password is the password when we export the p12 file, that is, we set it. ABCABC. Then we need to set up a CIode for the generated PEM file. Here, we recommend or use this ABCABC to prevent confusion (of course, you can set a more meaningful method)