This Swift package provides a client library for interacting with the App Store Connect API. It leverages the power of Swift OpenAPI Generator to automatically generate code from the provided OpenAPI specification file (openapi.yaml).
This Swift package provides a client library for interacting with the App Store Connect API. It leverages the power of Swift OpenAPI Generator to automatically generate code from the provided OpenAPI specification file (openapi.yaml).
dependencies: [
.package(url: "https://github.com/LLCFreedom-Space/fs-app-store-connect-client", from: "1.0.2")
]
import AppStoreConnectClient
Here’s an example of how to use the AppStoreConnectClient to fetch information about list of your apps in App Store Connect:
let credentials = Credentials(
issuerId: "<ISSUER_ID>"
keyId: "<KEY_ID>"
privateKey:
"""
-----BEGIN PRIVATE KEY-----
PRIVATE KEY
-----END PRIVATE KEY-----
""",
expireDuration: "<TIME_INTERVAL>"
)
let client = try AppStoreConnectClient(with: credentials)
do {
let fetchedApps = try await client.fetchApps()
// ... access to properties of apps
} catch {
print("Error fetching: \(error)")
}
Here’s an example of how to use the AppStoreConnectClient to fetch information about versions of your app:
let credentials = Credentials(
issuerId: "<ISSUER_ID>"
keyId: "<KEY_ID>"
privateKey:
"""
-----BEGIN PRIVATE KEY-----
PRIVATE KEY
-----END PRIVATE KEY-----
""",
expireDuration: "<TIME_INTERVAL>"
)
let client = try AppStoreConnectClient(with: credentials)
do {
let fetchedApps = try await client.fetchApps()
let apps = try await client.fetchApps()
guard let app = apps.first(where: { $0.bundleId == "your.bundle.id" }) else {
throw AppStoreConnectError.invalidBundleId
}
let releases = try await client.fetchVersions(for: app)
// ... access to properties of apps
} catch {
print("Error fetching: \(error)")
}
To enable automatic code generation, add the Web Service Endpoint to the openapi-generator-config.yaml file."
Currently, the following endpoints are implemented:
- v1/apps
- v1/apps/{id}/appStoreVersions
- v1/builds
- v1/builds/{id}/preReleaseVersion
We welcome contributions to this project! Please feel free to open issues or pull requests to help improve the package.
LLC Freedom Space – @LLCFreedomSpace – [email protected]
Distributed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3. See LICENSE.md for more information.