SkygearIO / chat

Skygear Plugin - Chat SDK
Apache License 2.0
17 stars 18 forks source link

Push Notifications Config #226

Closed KhaledAld closed 6 years ago

KhaledAld commented 6 years ago

Hi I deploy sky server on local using docker and i want to enable push notifications on it.

my questions is : where is the APNS_TOKEN_KEY_PATH (Path on application contianer or where )??

i added it to : “APNS_TOKEN_KEY_PATH : /app/AuthKey_22BTC9Y68P.p8” and i have this error when try to send notification from iOS :

Error Domain=SKYOperationErrorDomain Code=10003 “An unexpected error has occurred.” UserInfo={NSErrorFailingURLKey=http://192.168.2.160:3001/push/user, SKYErrorMessage=Unable to send push notification because APNS is not configured or there was a problem configuring the APNS.
, SKYErrorName=UnexpectedError, SKYOperationErrorHTTPStatusCodeKey=500, NSLocalizedDescription=An unexpected error has occurred.}

and this is my environment variables :

-APNS_ENABLE: "YES"
      APNS_ENV: sandbox
      APNS_TYPE: token
      APNS_KEY_ID:  xxxxxxxxx
      APNS_TEAM_ID: xxxxxxxxx
      APNS_TOKEN_KEY: -----BEGIN PRIVATE KEY-----
                        xxxxxxxxx
                        xxxxxxxxxxxx
                        xxxxxxxxxx
                        xxxxxxxxxxxxx
                      -----END PRIVATE KEY-----
      APNS_TOKEN_KEY_PATH: /AuthKey_xxxxxxxxxxxxxxx.p8 
tensiuyan commented 6 years ago

@KhaledAld please refer to this discussion thread: https://discuss.skygear.io/t/example-for-skygear-environment-variables/157/2

closing this issue since this is not a bug report.