[英]I'm trying to use message template for iOS
I want to create template for push notification so far I'm stuck here and it's not working. 到目前为止,我想创建用于推送通知的模板,但我一直停留在这里,但无法正常工作。
public static async void SendPushNotificationApns1(string msgTemplate)
{
NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(ListenConnectionString, NotificationHubName);
string msg = "{\"aps\":{\"alert\":\"$(msgTemplate)\"}}";
await hub.SendAppleNativeNotificationAsync(msg);
}
它发生在: string msg = "{\\"aps\\":{\\"alert\\":\\"" + $"{messageParam}" +"\\"}}";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.