0

I have a problem with apns sharp:

I get the device token from my iTunes for the iPhone, and I put it into the program.

However I am getting a baddevicetokenexception : 40 , invalid ... error. He must have 64 characters.

I don't know how to get a device token with 64 characters?

Thanks.

Conner
  • 30,144
  • 8
  • 52
  • 73
Yassine
  • 1
  • 1

1 Answers1

0

Your id is the unique identifier of the iPhone, but the devicetoken is the id to send to Apple for notifications.

To get the deviceToken :

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
Michaël
  • 6,676
  • 3
  • 36
  • 55