Files
iOS/Sources/PushServer/Tests/AppTests/Fakes/FakeLegacyNotificationParser.swift
Zac West c0a73840d6 APNS server in Vapor (#2024)
## Summary
Implements the push send and rate limit information in Swift using Vapor.

## Any other notes
This will allow us to get off Firebase, which gives a few immediate benefits:
- We can send PushKit notifications for complications, widgets, and location updates.
- We remove the last SDK that uses network connectivity to third parties.
2021-12-26 00:23:33 -08:00

15 lines
422 B
Swift

import SharedPush
class FakeLegacyNotificationParser: LegacyNotificationParser {
var resultHandler: (_ input: [String: Any]) -> LegacyNotificationParserResult = { _ in
.init(headers: [:], payload: [:])
}
func result(
from input: [String: Any],
defaultRegistrationInfo: @autoclosure () -> [String: String]
) -> LegacyNotificationParserResult {
resultHandler(input)
}
}