Skip to content

Commit

Permalink
New property for FCMAndroidNotification (#16)
Browse files Browse the repository at this point in the history
* add new property for `FCMAndroidNotification`
* add `swiftpm` folder to `.gitignore`
  • Loading branch information
nerzh authored and MihaelIsaev committed Dec 12, 2019
1 parent def50eb commit 8bae36d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit 8bae36d

Please sign in to comment.