简体   繁体   English

我正在尝试为iOS使用消息模板

[英]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.

相关问题 如果文件中没有特定的字符串,我正在尝试报告一条消息。 我不断收到相同的消息 - If a specific string is not in the file, I'm trying to report a message. I keep getting the same message 我正在尝试使用正则表达式从RichTextBox检索文本 - I'm trying to use a regular expression to retrieve text from RichTextBox 我正在尝试使用 c# 文件句柄,但它不可用 - I'm trying to use the c# file handle, but it's not available 我正在尝试使用 switch case 来显示存储在类中的数据 - I'm trying to use switch case to display data stored in a class 当我尝试在JavaScript中使用它时,模型为null - Model is null when I'm trying to use it in JavaScript 我正在尝试使用backgroundworker但它不起作用 - 为什么? - I'm trying to use backgroundworker but it doesn't work - why? 在尝试使用 selfTracking 时,我收到客户端错误 - While trying to use selfTracking I'm receiving Client error 我正在尝试将 DataTable 传递给 Class 并收到此消息:输入字符串格式不正确 - I'm trying to pass DataTable to Class and I get this message: Input string was not in a correct format 我正在尝试编译以下代码,但继续收到相同的错误消息 - I'm trying to compile the following code, but keep on getting the same error message 我要使用的单位列表中出现一个奇怪的错误,而我却找不到答案 - I have a weird error for a list in unity I'm trying to use, and I just couldn't find an answer for it
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM