Amazon Web Services mobile hub SNS push for iOS

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. 20.3k 19 19 gold badges 106 106 silver badges 197 197 bronze badges asked Jul 20, 2016 at 4:13 977 1 1 gold badge 11 11 silver badges 19 19 bronze badges

2 Answers 2

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.

enter image description here

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.

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.