Azure 通知中心如何在标记表达式中使用安装 ID?
Azure notifications hub how can I use installation Id in a tag expression?
我一直在设置一个项目,以使用 Azure 通知中心使用 https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-registration-management 中描述的安装模式提供推送通知。
使用几个 iOS 测试设备进行安装的基本设置和创建工作没有任何问题,并且使用在线测试发送功能或 .NET SDK 可以同时向所有设备发送通知不出所料。
尝试使用标记表达式将通知定位到特定设备时出现问题。如文档中所述:
The installation model makes it easy to do individual pushes - targeting specific device. A system tag "$InstallationId:[installationId]" is automatically added with each installation based registration. So you can call a send to this tag to target a specific device without having to do any additional coding.
听起来不错,但是当将标记表达式设置为 $InstallationId:[installationId]
时,在线测试发送和 .NET SDK return 400 错误请求。
Azure 门户测试发送的屏幕截图:
任何人都可以提供更多关于使用这样的安装的信息吗?
安装 ID 需要用大括号括起来,而不是像文档中建议的那样用方括号括起来。例如:
$InstallationId:{installtion_id}
我一直在设置一个项目,以使用 Azure 通知中心使用 https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-registration-management 中描述的安装模式提供推送通知。
使用几个 iOS 测试设备进行安装的基本设置和创建工作没有任何问题,并且使用在线测试发送功能或 .NET SDK 可以同时向所有设备发送通知不出所料。
尝试使用标记表达式将通知定位到特定设备时出现问题。如文档中所述:
The installation model makes it easy to do individual pushes - targeting specific device. A system tag "$InstallationId:[installationId]" is automatically added with each installation based registration. So you can call a send to this tag to target a specific device without having to do any additional coding.
听起来不错,但是当将标记表达式设置为 $InstallationId:[installationId]
时,在线测试发送和 .NET SDK return 400 错误请求。
Azure 门户测试发送的屏幕截图:
任何人都可以提供更多关于使用这样的安装的信息吗?
安装 ID 需要用大括号括起来,而不是像文档中建议的那样用方括号括起来。例如:
$InstallationId:{installtion_id}