Service
-
Service responsible for sending generated App Store Connect requests.
A service instance owns the current JWT and automatically refreshes its signature before a request is sent if the token has expired. It also centralizes response decoding, HTTP error mapping, and pagination helpers for responses conforming to
See morePagedResponse.Declaration
Swift
public actor BagbutikService -
A JSON Web Token used to authorize requests sent through
BagbutikService.Bagbutik creates tokens with Apple’s required ES256 signature and a 20 minute expiration. When a service sends a request, the signature is regenerated automatically if the current token has expired.
Full documentation for how JWT is used with the API: https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests
See moreDeclaration
Swift
public struct JWT : Sendable -
FetchDataAsynchronousThe async transport closure used by
BagbutikService.Provide a custom implementation when you want to stub network traffic in tests, route requests through a custom
URLSession, or attach your own delegate handling.Declaration
Swift
public typealias FetchData = @Sendable (_ request: URLRequest, _ delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)Parameters
requestThe request to execute.
delegateAn optional task specific delegate.
Return Value
The raw response body and URL response returned by the transport.
-
Errors from the API or from the decoding of the responses.
See moreDeclaration
Swift
public enum ServiceError : Error
View on GitHub
Service Reference