1
votes

We are using Azure mobile service NODE back end as a server. We are using Notification Hub to push notify our iOS and Android clients. However, we have one more requirement to develop an admin portal app in iOS.

So,We are going to develop one separate app for Admin portal.This app also has requirement to send the Push notification. Means Azure mobile service will have to send Notifications to existing iOS and android app as well as this new iOS Admin app.

My doubt is, can I send push notification to two different clients of iOS from the single Azure mobile Services Notification Hub? Because when I checked PUSH configuration on the Azure portal it shows only one .p12 file upload provision.

In my case it will be two different .p12 files i.e. one is already uploaded for existing iOS client and one I will have to upload for iOS admin app.

Can some somebody help me or guide me to the right path? I am quite new the Azure mobile services. I searched a lot regarding this topic but did not get anything related to my scenario.

Will it be possible to send PUSH to two separate iOS clients which are pointing to same Azure Mobile Service Notification Hub? Or I will have to create separate mobile service for that?

1

1 Answers

3
votes

You will need a separate Notification Hub for each app. You can keep your Mobile Service using the existing Notification Hub for your main app, and create a new Notification Hub for your admin app.

Then in your Node scripts for the admin app that need to register devices or send notifications, use the 'azure' npm to connect to the admin app Notification Hub, as described in this article. The Mobile Services Node backend already includes the azure npm, so you can skip running 'npm install azure'.

var azure = require('azure');
var notificationHubService = azure.createNotificationHubService('hubname','connectionstring');