C# I';我正在尝试使用iOS的消息模板

C# I';我正在尝试使用iOS的消息模板,c#,ios,json,C#,Ios,Json,我想为推送通知创建模板,到目前为止,我被困在这里,它无法工作 public static async void SendPushNotificationApns1(string msgTemplate) { NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(ListenConnectionString, NotificationHubName); string ms

我想为推送通知创建模板,到目前为止,我被困在这里,它无法工作

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}”+“\'}”

它发生在:string msg=“{\'aps\”:{\'alert\”:\''+$“{messageParam}”+'\'}”;