Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mismatched Bundle ID (Sandbox) in OneSignal

I'm trying to send PN to my iOS App.

I followed the standard steps, i.e.:

  • create new app and upload the development and distribution(sandbox) certificates

  • put the App id in my project: OneSignal.initWithLaunchOptions(launchOptions, appId:"myAppID")

  • create new template

  • send a message

When I sent the PN I got "send message successfully" green message, but after a while I got a warning when I clicked on it I directed to App Settings page and the warning is:

Mismatched Bundle ID (Sandbox)

and I didn't receive any PN!!

I checked my bundle ID in my project and it's 100% matched to the uploaded certificates.

Anyone faced like this problem when trying to use OneSignal for PN?

Please help.

Thanks.

like image 815
Rawan Avatar asked Nov 22 '16 13:11

Rawan


People also ask

Why do bundle IDS start with com?

It's a convention that Apple recommends for uniqueness. Since Internet domain names are guaranteed to be unique, using them in your bundle id ensures it's unique. Two companies might have the same name, for example Acme, but only one of them could own the domain name acme.com.

What do you put in a bundle identifier?

To create a unique bundle identifier, you append the name of the application to the reversed domain, for example, com. cocoacasts.


1 Answers

This problem happens when your application is built with a Provisioning Profile for a Bundle ID that does not match the Bundle ID of the push certificate you uploaded to OneSignal.

It is possible that you have created several builds of your application, some with the correct bundle id and some with an incorrect one. As a result you may have subscribed devices in OneSignal that are linked to different bundle ids.

If you are able to receive notifications with the latest build of your application then you can probably ignore this error. If all of the iOS notifications you send show up as "Invalid", then you must either upload a new push certificate with the correct bundle id, or build your app with a provisioning profile that matches your push certificate's bundle id.

like image 197
Gdeglin Avatar answered Sep 22 '22 08:09

Gdeglin