Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Web Services mobile hub SNS push for iOS

mobile hub -> create new application -> push -> ios -> p12 file upload -> save changes

When I click on save changes below error message I am getting

Invalid parameter: Attributes Reason: You provided a certificate of type SANDBOX, which cannot be used to create an application of type iOS Production. Please select an application of type SANDBOX or provide a certificate of type iOS Production (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: f5f810fd-7f8e-5462-9ff1-40f586dbe4ec)

I am using certificate of type sandbox (dev) not iOS production.

like image 617
Supraj V Avatar asked Jul 20 '16 04:07

Supraj V


1 Answers

AWS Mobile Hub has simplified the configuration process for the iOS Push Notifications feature. For the iOS platform, we have removed the iOS Dev (Sandbox) option in favor of supporting the Universal Apple Certificate. This new (as of December 17, 2015) Apple Push Notification service SSL client certificate supports both Sandbox & Production environments and therefore only one certificate is needed for the lifecycle of your iOS application.

You will need to generate a new Universal Apple Certificate via the Apple Developer Portal, then upload a .p12 of this certificate when configuring the iOS Push Notification Mobile Hub feature. enter image description here

Once you upload the new certificate and save changes, Mobile Hub creates an SNS Apple Production Platform Application resource on your behalf. Any registered device running the Mobile Hub sample application.

Once caveat to be aware of when testing development and production:

Since Mobile Hub is creating an SNS Apple Production Platform Application, the mobile application must be built using the Ad Hoc Distribution or App Store Distribution provisioning profiles for push notifications to work. We are planning to change this in the future and default to creating an Apple Development (SANDBOX) Platform Application using the same .p12 certificate. If you are testing in development (using the development provisioning profile to build your app) then you'll need to make a few modifications.

  1. Create an Apple Development Platform Application through the SNS Console using the same .p12 you used when enabling Push Notifications in your Mobile Hub project.

  2. In the iOS project in Xcode, change the SNS Application Arn in the info.plist as it defaults to the Apple Production Platform Application Arn that Mobile Hub created on your behalf.

like image 90
Dennis H Avatar answered Oct 14 '22 13:10

Dennis H