I've been working on creating a simple connected App, that can receive Apple Push Notification. For that I: Created an Xcode project using force iOS. Used Keychain Access to create 2 CSR file, and used the Apple Developer Program to create Certificates (One for The App, using a CSR, and the other for the Push functionality using the other CSR). I Created Provisioning Profile with MyApp and my phone (Real device). I enabled the Push functionality in Xcode and I was able to see in Salesforce my device Registration when I log into my App.

The problem occurs when I try to send A Test Push Notification From Salesforce. I choose as the recipient the Token from the previous registration. But the answer is always : "Recipient field contains invalid device token". I suspect that this is not so much a problem on the Token, but a problem on the certificate I use.

I've been looking all other the net to see how to build this .P12 Certificate, but all the different ways I found, always lead to the same error (Except when I create really bad Certificate, obviously.).

Could someone help me out figuring out what this error is really about and how to fix it?

Best regards,


Ok, one of my colleagues figured out what the problem was. It was coming from the Bundle ID. The Bundle Id must end with the application name. I had my application package that looked like com.test.validation and my app was pushnotification. So the BundleId needs to be com.test.validation.pushnotification, and not just com.test.validation like what I was doing.

| improve this answer | |
  • Sound painful. And people complain about Apex.... – Eric May 25 '18 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.