vapor-community / apns

Vapor APNS for iOS
60 stars 2 forks source link

Don’t do storage in this package #2

Closed mxcl closed 3 months ago

mxcl commented 5 years ago

From https://github.com/vapor/vapor/issues/1650

You said:

Off topic from this thread but I guess the idea is, since there's no DB storage in NIO. Id need to support the storage and registration of subscriptions/devices inside of Vapor (ie the device id's, and channels) and then setup something separate on Swift-NIO that actually communicates with Apple, but my Vapor App communicates with the NIO stack?

I don't think you should do storage or database work here, that's up to the consumer. Just my 2¢, but it seems outside the boundaries of the purpose of this part of the stack. The consumer of this package will want to choose how such things are stored themselves.

tanner0101 commented 5 years ago

I agree. IMO this package can and should depend solely on SwiftNIO. Anything else needed for APNS should be defined as structs or protocols that the user can supply.