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

All FCMAndroidConfig fields optional #34

Merged
merged 1 commit into from
Jul 26, 2021
Merged
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
16 changes: 8 additions & 8 deletions Sources/FCM/FCMAndroidConfig/FCMAndroidConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ public struct FCMAndroidConfig: Codable, Equatable {
/// while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s".
/// The ttl will be rounded down to the nearest second.
/// A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
public var ttl: String
public var ttl: String?

/// Package name of the application where the registration tokens must match in order to receive the message.
public var restricted_package_name: String
public var restricted_package_name: String?

/// Arbitrary key/value payload.
/// If present, it will override FCMMessage.data.
public var data: [String: String] = [:]
public var data: [String: String]?

/// Notification to send to android devices.
public var notification: FCMAndroidNotification
public var notification: FCMAndroidNotification?

/// Public Initializer
public init(collapse_key: String? = nil,
priority: FCMAndroidMessagePriority = .normal,
MihaelIsaev marked this conversation as resolved.
Show resolved Hide resolved
ttl: String,
restricted_package_name: String,
data: [String: String] = [:],
notification: FCMAndroidNotification) {
ttl: String? = nil,
restricted_package_name: String? = nil,
data: [String: String]? = nil,
notification: FCMAndroidNotification? = nil) {
self.collapse_key = collapse_key
self.priority = priority
self.ttl = ttl
Expand Down