Swiftpack.co - Package - joeltrew/BitriseAPI-Swift

Bitrise API for Swift

A framework for connecting to the Bitrise API, which allows you to access your accounts Apps, Builds, and Artifacts.

This framework is not developed by or in any way associated with Bitrise ltd (bitrise.io)

Swift Version Carthage compatible SwiftPackage compatible


  • ☑ Get your apps
  • ☑ Get builds for your apps
  • ☑ Get artifacts for your builds
  • ☑ Abort builds
  • ☑ Full pagination support for results
  • ☑ Supports query filters for the builds endpoint
  • ☑ Support for iOS, macOS and tvOS (Latter two may need testing)

You can track the progress of Bitrise's API here


  • iOS 9.0+
  • Swift 5.0+



Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/BitriseAPI.framework to an iOS project.

github "joeltrew/BitriseAPI-Swift" ~> 1.0

Swift Package Manager

Add the following dependency to your Package.swift manifest:

dependencies: [
    .Package(url: "https://github.com/joeltrew/BitriseAPI-Swift", majorVersion: 1)


Download and drop BitriseAPI.xcodeproject in your project.


Not at the moment, open to a PR

Usage example

        // Create a BitriseService object using your user token
        service = BitriseService(userToken: "your_api_token_here")
        // Call methods on the object
        // Getting an app by a specific slug
        service?.getAppBySlug("The_slug/id_of_your_app", completion: { (appResult) in
            if case let .success(apps) = appResult {
                print("App if request was a success: ", app)
        // Listed content is returned wrapped in a `PagedData` wrapper which includes pagination details
        service?.getApps(completion: { (pagedAppsResult) in
            switch pagedAppsResult {
            case .success(let pagedApps):
                print("Pagination metadata: ", pagedApps.pagination)
                print("Array fo apps: ", pagedApps.data)
            case .failure(let error):
                print("Handle the error in some way")
        // You can supply a pagination object for endpoints that support it
        let pagination = Pagination(pageItemLimit: 10, next: "29e37a4844dda34b")
        // The get builds enpoint supports providing a query object, which allows you to filter results
        // For example:  only retuning successful builds
        var buildFilterQuery = BuildFilterQuery()
        buildFilterQuery.status = .finished(.success)
        service?.getBuildsForApp(app, pagination: pagination, filterQuery: buildFilterQuery, completion: { (buildsResult) in
            if case let .success(builds) = buildsResult {
                print("Builds: ", builds.data)


Stars: 6


Used By

Total: 0


- 2019-10-03 15:06:01