We are attempting to send push notifications via Azure Notification Hub and aren't able to send messages from Azure. We've tried debugging but have been unable to figure out the error from the documentation.
How can we debug this further? We've walked through MSDN's documentation in detail but haven't been able to come up with anything.
Note: We create client, without enabletest option.
NotificationHubClient.CreateClientFromConnectionString(NOTIFICATION_SERVICE_CONNECTION_STRING, NOTIFICATION_SERVICE_NAME);
Registration Process:
RegistrationDescription registration = Hub.CreateAppleNativeRegistrationAsync(deviceToken, new List() {tag123});
We are able to get registration id from the process. We appear to get back a successful RegistrationDescription that shows our registration id, tags, device token (pushId), etag and registration id. We do show successful registration operations in the Azure Monitor. However, After registering the device, we don't see an increase in active devices or registrations in our Azure dashboard.
Now, when we try to send notfication, as below,
var notification = Hub.SendAppleNativeNotificationAsync(apnsJson(), tag123);
And when we inspect the NotificationOutcome object, Success and Failure shows as 0, tracking id has a value. Results is null and State shows as 'Enqueued'. But we dont get the notification sent to the device.
We currently have only test hub setup and we verified the bundle id, certificates etc and all seem to be fine. We are not sure why Results node is empty. From documents, the response should be something like below. "Notification state: DetailedStateAvailable, success: 1, tracking id: xxxxxx-xxxx-xxxx-xxxx-xxxxxx, notification id: {empty} Platform: apple, Device reg id: {blah-blah-blah}, Result: The Notification was successfully sent to the Push Notification System, PnsHandle: xxx"
Pls help us in identifying or debug the problem and solve the same.
Is there anyway we can use the tracking id, we receive, to track it in the Azure portal, to get more details on what is wrong etc. Appreciate quick response.
Pls let me know if you need more details.