0

I have followed the steps in this tutorial and have managed to send notifications to my Cordova app.

When I tried to replicate the steps using the production certificate instead, it did not work, so I have two questions:

1) What would I need to do differently in order for it to work?

2) Could I use the development certificate on production? Any restrictions?

NSNoob
  • 5,548
  • 6
  • 41
  • 54
WagnerMatosUK
  • 4,309
  • 7
  • 56
  • 95
  • I have never worked with Cordova so I wouldn't know but [Does this help](https://stackoverflow.com/questions/45925548/unable-to-add-push-notifications-entitlement-to-ios-production-with-cordova-plug)? – NSNoob Aug 01 '18 at 10:45
  • is there any error messages ?? you cannot use development certificate on production – Oshitha Wimalasuriya Aug 01 '18 at 10:47
  • The message I get on AWS SNS: `Endpoint is disabled (Service: AmazonSNS; Status Code: 400; Error Code: EndpointDisabled; Request ID: some-id)` – WagnerMatosUK Aug 01 '18 at 14:30

3 Answers3

1

Build your app using an Ad Hoc provisioning profile in order to test push in a production environment. An app build using an App Store or Ad Hoc profile will use APNS production, while an app build using a Development profile will use the sandbox APNS.

enter image description here

oyvindhauge
  • 3,496
  • 2
  • 29
  • 45
  • could you please elaborate a bit? Should I use a production or development certificate? I'm very new to both Cordova and Apple development. Thank you! – WagnerMatosUK Aug 01 '18 at 11:24
  • 1
    @WagnerMatosUK You should use an "Apple Push Notification service SSL (Sandbox & Production)" alongside an app build using an Ad Hoc provisioning profile to test push in production (App Store provisioning profiles are only used when uploading binary to App Store). – oyvindhauge Aug 01 '18 at 11:42
  • I will try and post the details. Thank you! – WagnerMatosUK Aug 01 '18 at 11:48
  • I have tried as you suggested but unless I'm missing something, I got the same error as before: `Endpoint is disabled (Service: AmazonSNS; Status Code: 400; Error Code: EndpointDisabled; Request ID: some-id)` – WagnerMatosUK Aug 01 '18 at 14:27
  • @WagnerMatosUK Sorry, I'm not very familiar with AWS services. This post seems to be related to your problem: https://stackoverflow.com/questions/19374411/getting-endpointdisabled-from-amazon-sns – oyvindhauge Aug 02 '18 at 07:18
1

development certificate can't use to production , it will invalid. Distinguish development or production is use debug or release model .

[Xcode] --> [product] --> [scheme] --> [edit scheme]

eg:

enter image description here

Confirmation switch has been opened in developer websit or xcode .

eg:

enter image description here

and

enter image description here

NSNoob
  • 5,548
  • 6
  • 41
  • 54
stack Stevn
  • 114
  • 6
0

instant choosing Apple Push Notification service SSL (Sandbox).you may choose it apple push notification service ssl (sandbox & production).It will make single pem file for both production and sendbox

if you are using third party for push upload it and test.If you are not then set your app environment production in your server side code and it will work!

Deepak Pal
  • 33
  • 5