Skip to content

8.0 cleanup: remove deprecated APIs and tidy the public surface - #271

Merged
kylebrowning merged 2 commits into
mainfrom
remove-deprecated-apis
Oct 16, 2026
Merged

kylebrowning merged 2 commits into
mainfrom
remove-deprecated-apis

Conversation

@kylebrowning

Copy link
Copy Markdown
Owner

Breaking cleanup for 8.0, alongside #270.

Removed deprecated APIs:

  • APNSEnvironment.sandbox. Use .development.
  • P256.Signing.PrivateKey.loadFrom(string:). Use init(pemRepresentation:).
  • sendWidgetsNotification(notification:deviceToken:). Use sendWidgetsNotification(_:deviceToken:).
  • APNSError.ErrorReason.badEnvironmentKeyInToken. Apple doesn't document this reason; a response carrying it now decodes as .unknown("BadEnvironmentKeyInToken").

Other cleanup:

  • APNSClient and APNSBroadcastClient default eventLoopGroupProvider to .shared(MultiThreadedEventLoopGroup.singleton). The README and DocC examples no longer recommend the deprecated .createNew.
  • APNSExample is no longer exported as a product, so dependents don't see it. The target stays, and swift run APNSExample still works in this repo.
  • sendLiveActivityNotification now spells out ContentState: Encodable & Sendable, matching the notification type and the other send methods. This isn't source-breaking, because the notification type already required it.

All 162 tests pass.

@kylebrowning
kylebrowning merged commit 26e362e into main Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant