Hi,
I have two device iPad iOS 9.3 and iPhone iOS 10.1.1
I have installed SDK via Cocoapods and works fine in iPad but not in iPhone.
I'm trying to send messages from Uairship dashboard, it is receiving in iPad but not in iPhone
although iPhone Device is registered in dashboard (Cross checked via Device Token).
Please Help Me what is i'm missing in case of iOS 10
Push Notifcation for iOS 10
Didn't find what you were looking for?
New post-
Michael Halka
Hi Adarsh,
I'm looking at your Device Tokens in the dashboard, and I'm seeing that they're being registered as inactive.
Do you know which one of those Device Tokens is the iPhone?
One thing you'll want to check is your Xcode logs and see if there are any errors or anything involving the aps-environment string. This could indicate a problem with the build of the app. But, definitely if you can provide those Xcode logs, that will help me determine what the issue is.
Comment actions -
Hello Michael,
We started getting notifications in my iPhone after fresh app launch. But Problem now I am facing is below:
1) I send few messages from Urban Airship, reached to device successfully.
2) I have sent few notification from my backend servers, reached to device successfully.
3) Now, send message from Urban Airship, no notifications are reaching to device after that. But I can see notifications from my server reaching to device.
You can get Logs generated in Xcode during this exercise here.
I have tried it multiple times and having same issue. Is that the case, we can have notifications either from Urban Airship or from my backend server? Just wanted to confirm, can we have both implementation in place (Apple native notification and Urban Airship notifications at same time ).
-Thanks
Comment actions -
Michael Halka
Adarsh,
I would recommend not using the native APS method to send to your devices.
Reason being is because if you don't keep track of the Urban Airship Channel ID effectively, then if that users Device Token changes, you won't be able to send a push to that user until you have the updated Token.
On the Urban Airship side, we manage any changes to the Device Token through the Channel ID, and the Channel ID always remains the same.
Now, the other part I'm concerned about is the fact that you had push working with UA and then after a few messages, everything stopped working.
That usually indicates to me that the app is not letting the UA SDK perform device registration, and instead handling those itself. Do you know if your app is trying to handle device registration and handling push by itself, or are you letting the SDK handle those automatically?
If you're not letting the SDK manage these, this could cause race conditions in the app such that device registration updates never make it to Urban Airship properly, or even opting out of push altogether.
You can see this when your Device Token in Urban Airship appears to be inactive, thus no pushes will be sent through Urban Airship since there are no opted-in devices.
Lastly, are you using another push provider in your app at this time? Using two providers in the app at the same time is not recommended since they will interfere with one another, which can also cause problems.
Comment actions -
Hello Michael,
I have gone through all my code, and removed all device registration happening in my code. Still the behaviour is same. We only use core APNS to send notifications to device.
Dose log sent earlier helped you to identify how we can solve this or at least the root cause it? Let me know, if you need sample project replicating the issue if that would help.
Comment actions -
Michael Halka
Adarsh,
Unfortunately I wasn't able to see in your logs if there was any problems.
If you can reproduce the issue with the [Urban Airship Sample] and provide the resulting logs and project, that will help me figure out where the issue is.
Comment actions -
Hello Michael,
I am able to reproduce issue in your sample app after adding our SDK. Once any messages notification received from our backend server it stops receiving notification from urbanairship. More specifically, this is happening only on iOS 10.x devices, on 9.0 it is working for me.
You can find the ZIP project and instructions to reproduce here. You can drop me a mail as well at adarsh@applozic.com for any particular information you need. Appreciate your help in advance.
-Thanks
Adarsh
Comment actions -
Michael Halka
Adarsh,
It seems like you are trying to use Urban Airship along with a chat framework that also supports push notifications, is that correct?
More than likely, the AppLozic framework is interfering with Urban Airship's push registration. Using two push providers in a single iOS app isn't going to work the way you think it would. Only one push provider should ever be present inside an app at any given time. Attempting to use two would result in unexpected behavior, such as the one you're running into.
The fix would be to remove the AppLozic framework from the app and use only the Urban Airship framework moving forward.
Also, if you are using other third-party frameworks like this in your app, please let us know before-hand, as that info is very important for troubleshooting issues like this.
Comment actions
Please sign in to leave a comment.
Comments
7 comments