vapor / apns

Helpful extensions and abstractions for using APNSwift
MIT License
115 stars 30 forks source link

Allow swapping of configurations #13

Closed grosch closed 2 years ago

grosch commented 4 years ago

Please provide a way that a single server app can support both the normal app's push notification (i.e. via the p8) and also passkit notifications (i.e. via the PEM files).

Right now we can't swap between configurations, to the best of my knowledge, because one thread might set it to config A, then another thread sets it to B, and then thread A tries to do the push and fails.

tanner0101 commented 4 years ago

We should allow registering multiple configurations based on some identifier. For example:

app.apns.configurations[.foo] = ...

req.apns(.foo).send(..., to: ...)
khanlou commented 3 years ago

This would also be really great for being able to switch between production and sandbox targets based on the auth token

LukasCZ commented 3 years ago

Any update on this? I'd love to be able to use APNSwift with two different topics (one for my beta bundle identifier and one for the bundle identifier with which I'm shipping to the App Store).

0xTim commented 3 years ago

I don't believe this has progressed yet. Feel free to open a PR if you can though!

SusanDoggie commented 2 years ago

I have opened a PR for this https://github.com/vapor/apns/pull/37

kylebrowning commented 2 years ago

This is fixed in #46