MihaelIsaev / FCM

⚡️ PushNotifications through FireBase for Vapor 3 and 4.
MIT License
120 stars 33 forks source link

Protocol 'Firebaseable' can only be used as a generic constraint because it has Self or associated type requirements #11

Closed Germantv closed 4 years ago

Germantv commented 4 years ago

This error comes about when I declare the lines extension Array where Element == Firebaseable { ... }

It goes away when I change return try Self.sendPush(title: title, message: message, token: token, on: req) to return try Firebaseable.sendPush(title: title, message: message, token: token, on: req) located inside the first sendPush() function body, was there just a mistake in the ReadMe??

MihaelIsaev commented 4 years ago

Thank you for reporting, I've fixed that typo in example 🙂