I'm making a cross platform app which will use push notifications.

When the user logs in, I record their device ID and send it to the server, allowing the server to send device specific messages via the API.

With Android this works fine. With iOS, I am not receiving the push notification via API calls (is working via pushwoosh website though, suggesting the device HAS registered)

The device token for Android looks similar to this

AP?91bH?G0t?h2?Ut?HYt-9jJH?LJ0A?u1?X2a-gNZ?xXCi?ZFC?mEC?5Rss?ayAc?C1V0?D6aC_ZVnN1TIk11cgHnT3cLiahwbO?mHt?jh56?ZkaH?m5M?Z59J?Y4Y?NWA7?Hds?0oGVlTg????????FZSrBz1BRA

The device token for iOS looks similar to this

970?f4?ff8e?87?ec?86?b0d?51b?17b?3397f5?012?db5e?69cd?c?????1a94

I'm not sure if the difference is significant? But the iOS API call is giving me an UnknownDevice response... so I assume the ID is wrong?

Any tips?

Ta :)

asked 25 Nov '14, 16:49
ct14's gravatar image

ct14
514

edited 27 Nov '14, 13:10

Just in case anyone else is having this issue.

It seems that building for iOS8 is the issue. I redownloaded XCode 5.1.1 and build the app for iOS 6.1 and the device token started working as expected again.

permanent link
answered 27 Nov '14, 13:06
ct14's gravatar image

ct14
514

That's actually should not happen. The thing I would try is to uninstall the app manually (not from XCode) and then reinstall through XCode.

(28 Nov '14, 07:08) shader shader's gravatar image

Hi Shader, yup, tried that, even tried recreating a new Cordova app from scratch and still had issues.

(28 Nov '14, 09:40) ct14 ct14's gravatar image

Is it working now fine? Otherwise please provide API call so I can check.

(28 Nov '14, 10:00) shader shader's gravatar image

Yes, the solution above worked for me and the supplied device token works via an API call.

(28 Nov '14, 10:48) ct14 ct14's gravatar image

There should be no "?" symbols. Are you sure you copied the token correctly?

permanent link
answered 26 Nov '14, 04:47
shader's gravatar image

shader
3.9k7

Hi Shader, I put the ? characters in there, just in case it's bad practice to make these ids public.

To reiterate, the supplied device token works for my android phone, it does not for my ios phone.

Ta -Chris

permanent link
answered 26 Nov '14, 10:05
ct14's gravatar image

ct14
514

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×353
×190
×141
×49

question asked: 25 Nov '14, 16:49

question was seen: 1,942 times

last updated: 28 Nov '14, 10:48