package io.geekidea.springbootplus.test;

import com.turo.pushy.apns.DeliveryPriority;
import com.turo.pushy.apns.PushType;
import com.wecloud.im.ws.sender.IosPush;

import java.util.HashMap;
import java.util.Map;

public class IosApnsPushTest {

    public static void main(String[] args) {

//             * @param apnsCertificatePath 证书
//     * @param productFlag         环境,测试=Boolean.FALSE,正式=Boolean.TRUE
//     * @param deviceToken         设备token
//     * @param alertTitle          标题
//     * @param alertBody           副标题
//     * @param contentAvailable    Boolean.FALSE
//    * @param customProperty      自定义属性
//    * @param badge               角标数量
//    * @param priority            DeliveryPriority.IMMEDIATE
//    * @param pushType            PushType.ALERT
//    * @param topicBundleId       undleId
//    * @param sound               rtc= "call.caf"; 否则为default

        Map<String, Object> customProperty = new HashMap<String, Object>(10);
        String apnsCertificatePath = "frogsell_push_dev.p12";
        String deviceToken = "27c93ca84bbf17d9ff8eb05df0576ac49822db2ae1c02aa0afea83b5c3861276";
        String alertTitle = "你好22";
        String alertBody = "hi";
        int badge = 1;
        String topicBundleId = "com.jdw.frogsell";

        boolean contentAvailable = false;
        IosPush.push(apnsCertificatePath, Boolean.FALSE, deviceToken, alertTitle, alertBody,
                contentAvailable, customProperty, badge
                , DeliveryPriority.IMMEDIATE, PushType.ALERT, topicBundleId,
                "default");

    }
}
