IgorPetkovic / hertz-fcm

A Hertz courier for sending push notifications with Firebase Cloud Messaging.
MIT License
0 stars 1 forks source link

iOS 13 Silent push notifications #3

Open cognitive-wsuriaputra opened 4 years ago

cognitive-wsuriaputra commented 4 years ago

Silent push notification in iOS 13 require new headers:

See below for the changes:

def message(token) { data: keys.map { |key| [key, notification.send(key)] }.to_h .merge!(notification.send(:data)), apns: { headers: { 'apns-push-type': apn_headers_pushtype }, payload: { aps: aps } }, token: token } end

def apn_headers_pushtype if notification.respond_to?(:silent?) && notification.send(:silent?) return background else return alert end

cognitive-wsuriaputra commented 4 years ago

@IgorPetkovic we noticed this issue in iOS 13 and I don't have permission to do a branch here

IgorPetkovic commented 4 years ago

@cognitive-wsuriaputra Hey Will, if you fork the repo, make the change, and then open a PR here, I can do a merge & release. Sorry for not responding sooner, I've been on vacation.