Class: Firebase::Admin::Messaging::APNSConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/firebase/admin/messaging/apns_config.rb

Overview

APNS-specific options that can be included in a Message.

Refer to ‘APNS Documentation` for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers: nil, payload: nil, fcm_options: nil) ⇒ APNSConfig

Parameters:

  • headers (Hash{Symbol,String => String}, nil) (defaults to: nil)

    A collection of APNs headers (optional). Header keys and values must be strings.

  • payload (APNSPayload, nil) (defaults to: nil)

    An APNs payload to be included in the message (optional).

  • fcm_options (APNSFCMOptions, nil) (defaults to: nil)

    Options for features provided by the FCM SDK for iOS (optional).



30
31
32
33
34
# File 'lib/firebase/admin/messaging/apns_config.rb', line 30

def initialize(headers: nil, payload: nil, fcm_options: nil)
  self.headers = headers
  self.payload = payload
  self.fcm_options = fcm_options
end

Instance Attribute Details

#fcm_optionsAPNSFCMOptions?

Returns Options for features provided by the FCM SDK for iOS.

Returns:

  • (APNSFCMOptions, nil)

    Options for features provided by the FCM SDK for iOS.



19
20
21
# File 'lib/firebase/admin/messaging/apns_config.rb', line 19

def fcm_options
  @fcm_options
end

#headersHash{Symbol,String => String}?

Returns A collection of APNs headers. Header values must be strings.

Returns:

  • (Hash{Symbol,String => String}, nil)

    A collection of APNs headers. Header values must be strings.



11
12
13
# File 'lib/firebase/admin/messaging/apns_config.rb', line 11

def headers
  @headers
end

#payloadAPNSPayload?

Returns An APNs payload to be included in the message.

Returns:

  • (APNSPayload, nil)

    An APNs payload to be included in the message.



15
16
17
# File 'lib/firebase/admin/messaging/apns_config.rb', line 15

def payload
  @payload
end