Azure 移动服务 PushNotifications 设备注册

标签 azure push-notification azure-mobile-services

我正在基于 AzureMobileServices 构建应用程序。但我遇到了以下问题。

由于某些原因,我每个 AzureMobileService 应用程序都需要很少的集线器(它将被少数 iOS 应用程序使用,因此有必要使用不同的 APNS 证书)。

我已经实现了通过必要的集线器发送通知的逻辑,但设备注册继续使用 web.config 中的连接字符串。

有什么方法可以处理设备注册过程以使设备注册到必要的集线器吗?

最佳答案

直接通过通知中心支持 Multi-Tenancy ,因此客户端在执行操作时需要直接连接到各个中心。如果设备注册使用相同的连接字符串,则您可能正在使用移动服务(移动应用程序)推送客户端。您介意检查一下吗?

get started iOS tutorial有一个片段可以帮助您:

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);
    }
}];

关于Azure 移动服务 PushNotifications 设备注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30122489/

相关文章:

Android 应用程序离线同步到 Azure SQL Server 和 Blob 存储

asp.net - 为什么 Azure 部署在 Windows 2012 Server 上比在 Windows 2008 Server 上慢

Azure 支付支持

Firebase 云消息传递报告错误

authentication - 移动应用程序的 ASP.NET Core 多提供商身份验证

c# - asp.net 5 上的 GCM/APNS

azure - 通过 terraform 将主访问 key 从存储添加到 KV

firebase - 未处理的异常 : Null check operator used on a null value (Flutter FCM)

android - 如何使用同一应用程序将通知从一个用户发送到另一个用户

c# - Entity Framework 代码首先添加额外列