fix apns development and production mode.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user