fix apns development and production mode.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
5ce2a8e2ca
commit
1dfa1a7fc5
|
@ -61,9 +61,14 @@ type RequestPushNotification struct {
|
||||||
func pushNotification(notification RequestPushNotification) bool {
|
func pushNotification(notification RequestPushNotification) bool {
|
||||||
var (
|
var (
|
||||||
success bool
|
success bool
|
||||||
|
apnsClient *apns.Client
|
||||||
)
|
)
|
||||||
|
|
||||||
apnsClient := apns.NewClient(CertificatePemIos).Development()
|
if PushConf.Ios.Production {
|
||||||
|
apnsClient = apns.NewClient(CertificatePemIos).Production()
|
||||||
|
} else {
|
||||||
|
apnsClient = apns.NewClient(CertificatePemIos).Development()
|
||||||
|
}
|
||||||
|
|
||||||
switch notification.Platform {
|
switch notification.Platform {
|
||||||
case PlatFormIos:
|
case PlatFormIos:
|
||||||
|
|
Loading…
Reference in New Issue