fix apns development and production mode.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-03-26 23:21:46 +08:00
parent 5ce2a8e2ca
commit 1dfa1a7fc5
1 changed files with 6 additions and 1 deletions

View File

@ -61,9 +61,14 @@ type RequestPushNotification struct {
func pushNotification(notification RequestPushNotification) bool {
var (
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 {
case PlatFormIos: