发送苹果推送消息APNS

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

https://github.com/arashnorouzi/Moon-APNS

先后使用了好几个插件,这个不错,支持群发。

使用方法:


namespace MoonAPNS
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            // var payload1 = new NotificationPayload("Device token","Message",Badge,"Sound");
            var payload1 = new NotificationPayload("Device Token", "Message", 1, "default");
            payload1.AddCustom("RegionID", "IDQ10150");

            var p = new List {payload1};

            var push = new PushNotification(false, "p12 file location","password");
            var rejected = push.SendToApple(p);
            foreach (var item in rejected)
            {
                Console.WriteLine(item);
            }
            Console.ReadLine();
        }

    }
}

 

转载于:https://my.oschina.net/xainghu/blog/1504139

你可能感兴趣的:(发送苹果推送消息APNS)