Skip to content

Bigger, better, functional!

Latest

Choose a tag to compare

@mr-rock mr-rock released this 25 Oct 18:08

Updates the library to v4.5.1 of the App Store Connect API, and adds pagination, API key authentication, and rate limiting.

BREAKING CHANGES

  • Minimum platforms: iOS 14, macOS 11, tvOS 14, watchOS 7, and visionOS 1.
  • Toolchain: Swift 6.0 or later (Xcode 16 or later).
  • Runtime: requires swift-openapi-runtime 1.11.0 or later.

NEW

  • API key authentication: APIKeyTokenProvider signs tokens from your API key, and renews them before they expire. Pass it to BearerAuthMiddleware as a token provider.
  • Pagination: paged operations accept a cursor query parameter, and PagedSequence iterates every page of a paged operation.
  • Rate limiting: RateLimitMiddleware retries "429 Too Many Requests" responses, waiting for the Retry-After header or backing off exponentially.
  • API v4.5.1: 1,303 operations and 1,473 schemas, including the App Asset Library, the version-based in-app purchase and subscription resources, and Game Center score moderation.

IMPROVED

  • Faster setup: the generated code ships with the package. There is no build plugin to trust, and 4 package dependencies instead of 12.
  • Bearer authentication: BearerAuthMiddleware can now be created outside the module, and accepts a token provider as well as a fixed token.
  • Documentation: the DocC catalog covers every operation and schema.

MIGRATING FROM 1.x

  1. Raise your deployment targets and toolchain to the minimums above.
  2. Replace Servers.server1(), which is now deprecated, with Servers.Server1.url().
  3. If Xcode reports "Build input file cannot be found" for swift-openapi-generator, delete the project's DerivedData folder. The build plugin is gone, but its cached build plan is not.