Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FirebaseAdmin/FirebaseAdmin.Tests/Messaging/MessageTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ public void ApnsConfig()
AnalyticsLabel = "label",
ImageUrl = "https://example.com/image.png",
},
LiveActivityToken = "token",
},
};
var expected = new JObject()
Expand Down Expand Up @@ -1052,6 +1053,9 @@ public void ApnsConfig()
{ "image", "https://example.com/image.png" },
}
},
{
"live_activity_token", "token"
},
}
},
};
Expand Down
9 changes: 9 additions & 0 deletions FirebaseAdmin/FirebaseAdmin/Messaging/ApnsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ public IDictionary<string, object> CustomData
}
}

/// <summary>
/// Gets or sets the APNs token used for live activities on iOS. Refer
/// to <a href="https://firebase.google.com/docs/cloud-messaging/ios/live-activity">
/// Firebase live activity documentation</a> for more information.
/// </summary>
[JsonProperty("live_activity_token")]
public string LiveActivityToken { get; set; }

/// <summary>
/// Gets or sets the APNs payload as accepted by the FCM backend servers.
/// </summary>
Expand Down Expand Up @@ -108,6 +116,7 @@ internal ApnsConfig CopyAndValidate()
Headers = this.Headers?.Copy(),
Payload = this.Payload.CopyAndValidate(),
FcmOptions = this.FcmOptions?.CopyAndValidate(),
LiveActivityToken = this.LiveActivityToken,
};
return copy;
}
Expand Down