Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new property for FCMAndroidNotification #16

Merged
merged 2 commits into from
Dec 12, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/Packages
/*.xcodeproj
Package.resolved
/.swiftpm
9 changes: 8 additions & 1 deletion Sources/FCM/FCMAndroidConfig/FCMAndroidNotification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ public struct FCMAndroidNotification: Codable, Equatable {
/// The notification's body text.
/// If present, it will override FCMNotification.body.
public var body: String?


/// The notification's channel id (new in Android O).
/// The app must create a channel with this channel ID before any notification with this channel ID is received.
/// If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
public var android_channel_id: String?

/// The notification's icon. Sets the notification icon to myicon for drawable resource myicon.
/// If you don't send this key in the request,
/// FCM displays the launcher icon specified in your app manifest.
Expand Down Expand Up @@ -49,6 +54,7 @@ public struct FCMAndroidNotification: Codable, Equatable {
/// Public Initializer
public init(title: String? = nil,
body: String? = nil,
android_channel_id: String? = nil,
icon: String? = nil,
color: String? = nil,
sound: String? = nil,
Expand All @@ -60,6 +66,7 @@ public struct FCMAndroidNotification: Codable, Equatable {
title_loc_args: [String]? = nil) {
self.title = title
self.body = body
self.android_channel_id = android_channel_id
self.icon = icon
self.color = color
self.sound = sound
Expand Down