一、下載地址
1、Github地址:https://github.com/shaojiankui/SmartPush
2、release安裝包:https://github.com/shaojiankui/SmartPush/releases
二、配置
1、安裝推送證書
沙盒環(huán)境:測試環(huán)境
生產(chǎn)環(huán)境
2、獲取pushtoken

三、發(fā)送類型
1、自定義推送數(shù)據(jù)
alert:推送消息的文本內(nèi)容
badge:應(yīng)用圖標(biāo)右上角的數(shù)字。可以設(shè)置一個值或者遞增當(dāng)前值。
sound:應(yīng)用 bundle 里的聲音文件名稱。
2、語音播報如何獲取聲音文件
下載.ipa文件,解壓后,進入包文件夾,找到.mp3文件

3、示例
發(fā)送內(nèi)容:
{
"aps":{
"alert":{
"title":"收到房東回復(fù)",
"body":"房東對您說:XXX;馬上查看"
},
"category":"categoryidentifier",
"badge":1,
"mutable-content":1,
"sound":"default",
"image":"[https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3078873712,1340878922&fm=26&gp=0.jpg](https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3078873712,1340878922&fm=26&gp=0.jpg)"
}
}
