jpush add config for ios env mode

pull/455/head
Gordon 2 years ago committed by Xinwei Xiong(cubxxw-openim)
parent 315fc6024e
commit dec96cd429

@ -233,6 +233,7 @@ messageverify:
iospush: iospush:
pushSound: "xxx" pushSound: "xxx"
badgeCount: true badgeCount: true
production: true
callback: callback:
# callback url 需要自行更换callback url # callback url 需要自行更换callback url

@ -42,7 +42,7 @@ func (j *JPush) Push(accounts []string, alert, detailContent, operationID string
var me requestBody.Message var me requestBody.Message
me.SetMsgContent(detailContent) me.SetMsgContent(detailContent)
var o requestBody.Options var o requestBody.Options
o.SetApnsProduction(false) o.SetApnsProduction(config.Config.IOSPush.Production)
var po requestBody.PushObj var po requestBody.PushObj
po.SetPlatform(&pf) po.SetPlatform(&pf)
po.SetAudience(&au) po.SetAudience(&au)

@ -208,6 +208,7 @@ type config struct {
IOSPush struct { IOSPush struct {
PushSound string `yaml:"pushSound"` PushSound string `yaml:"pushSound"`
BadgeCount bool `yaml:"badgeCount"` BadgeCount bool `yaml:"badgeCount"`
Production bool `yaml:"production"`
} }
Callback struct { Callback struct {

Loading…
Cancel
Save