Reputation: 1417
I'm building the app based on AzureMobileServices. But I meet the following problem.
For some reasons I need few hubs per one AzureMobileService app (it will be used by few iOS apps so there is necessary to use different APNS certificates).
I have implemented logic for send notification via necessary hub, but the device registration continue to use connection string from web.config.
Is it any way to handle device registration process to make device registrated for necessary hub?
Upvotes: 0
Views: 69
Reputation: 326
multi-tenancy is supported through Notification Hubs directly, so client will need to connect to various hubs directly when operations are performed. If the device registration is using the same connection string, it is likely that you are using Mobile Services' (Mobile Apps) push client. Do you mind checking?
The get started iOS tutorial has a snippet that could help out:
SBNotificationHub* hub = [[SBNotificationHub alloc] initWithConnectionString:
@"<connection string>" notificationHubPath:@"mynh"];
[hub registerNativeWithDeviceToken:deviceToken tags:nil completion:^(NSError* error) {
if (error != nil) {
NSLog(@"Error registering for notifications: %@", error);
}
}];
Upvotes: 2