-
-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Description
Is your feature request related to a problem? Please describe.
Example code snippets from README do not compile.
Describe the solution you'd like
Updated README with recent syntax.
Describe alternatives you've considered
Void
Additional context
I dove into the source code and came up with below snippet that compiles and works.
By submitting this Issue I'm looking to:
- have somebody to confirm that my code is OK or suggest a better solution.
- have README.md file updated with code snippets that compile.
let auth = APNSwiftConfiguration.AuthenticationMethod.jwt(
key: try ECDSAKey.private(filePath: ".../path-to/AuthKey.p8"),
keyIdentifier: JWKIdentifier(string: "keyId-value"),
teamIdentifier: "teamId-value"
)
let config = APNSwiftConfiguration(
authenticationMethod: auth,
topic: appBundleId,
environment: isProduction ? .production : .sandbox,
logger: nil,
timeout: .seconds(10)
)
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let conn = try APNSwiftConnection.connect(
configuration: config,
on: eventLoopGroup.any()
).wait()
// Use `send()` methods on `conn` to send push notifications.
Thanks for building this!
Metadata
Metadata
Assignees
Labels
No labels