{"id":1869,"url":"https://github.com/box/box-ios-sdk","last_synced_at":"2025-10-24T23:04:51.144Z","repository":{"id":30402452,"uuid":"33955225","full_name":"box/box-ios-sdk","owner":"box","description":"iOS SDK for the Box Content API","archived":false,"fork":false,"pushed_at":"2024-04-05T16:27:41.000Z","size":237342,"stargazers_count":120,"open_issues_count":2,"forks_count":111,"subscribers_count":63,"default_branch":"main","last_synced_at":"2024-04-14T09:06:38.733Z","etag":null,"topics":["box","sdk","swift"],"latest_commit_sha":null,"homepage":"https://developer.box.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/box.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-04-14T20:26:08.000Z","updated_at":"2024-04-23T19:06:05.797Z","dependencies_parsed_at":"2024-01-07T22:23:42.846Z","dependency_job_id":"cacbe838-7e58-4ccf-8405-a92d98b1bd56","html_url":"https://github.com/box/box-ios-sdk","commit_stats":{"total_commits":841,"total_committers":73,"mean_commits":"11.520547945205479","dds":0.8573127229488704,"last_synced_commit":"00a4e27a55fc38db75984fdf06ff3e94bc547658"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-ios-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-ios-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-ios-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-ios-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/box","download_url":"https://codeload.github.com/box/box-ios-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["box","sdk","swift"],"created_at":"2024-01-05T20:15:57.734Z","updated_at":"2025-10-24T23:04:51.117Z","avatar_url":"https://github.com/box.png","language":"Swift","funding_links":[],"categories":["SDK","Official","官方的"],"sub_categories":["Official","Other free courses"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/box/sdks/blob/master/images/box-dev-logo.png\" alt= “box-dev-logo” width=\"30%\" height=\"50%\"\u003e\n\u003c/p\u003e\n\n# Box iOS SDK v10\n\n[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)\n![build](https://github.com/box/box-ios-sdk/actions/workflows/build_and_test.yml/badge.svg?branch=sdk-gen)\n[![Platforms](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_visionOS_Linux-yellowgreen?style=flat-square)](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_visionOS_Linux-yellowgreen?style=flat-square)\n[![Coverage Status](https://coveralls.io/repos/github/box/box-ios-sdk/badge.svg?branch=sdk-gen)](https://coveralls.io/github/box/box-ios-sdk?branch=sdk-gen)\n[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-orange.svg)](https://cocoapods.org/pods/BoxSDK)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Introduction](#introduction)\n- [Supported versions](#supported-versions)\n    - [Version v6](#version-v6)\n    - [Version v10](#version-v10)\n    - [Which Version Should I Use?](#which-version-should-i-use)\n- [Requirements](#requirements)\n- [Installing](#installing)\n    - [Swift Package Manager](#swift-package-manager)\n    - [Carthage](#carthage)\n    - [CocoaPods](#cocoapods)\n- [Getting Started](#getting-started)\n- [Authentication](#authentication)\n- [Documentation](#documentation)\n- [Migration guides](#migration-guides)\n- [Versioning](#versioning)\n    - [Version schedule](#version-schedule)\n- [Contributing](#contributing)\n- [FIPS 140-2 Compliance](#fips-140-2-compliance)\n- [Questions, Bugs, and Feature Requests?](#questions-bugs-and-feature-requests)\n- [Copyright and License](#copyright-and-license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# Introduction\n\nWe are excited to introduce the v10 major release of the Box iOS SDK,\ndesigned to elevate the developer experience and streamline your integration with the Box Content Cloud.\n\nWith this SDK version, we provide the `BoxSdkGen` module, which gives you access to:\n\n1. Full API Support: The new generation of Box SDKs empowers developers with complete coverage of the Box API ecosystem. You can now access all the latest features and functionalities offered by Box, allowing you to build even more sophisticated and feature-rich applications.\n2. Rapid API Updates: Say goodbye to waiting for new Box APIs to be incorporated into the SDK. With our new auto-generation development approach, we can now add new Box APIs to the SDK at a much faster pace (in a matter of days). This means you can leverage the most up-to-date features in your applications without delay.\n3. Embedded Documentation: We understand that easy access to information is crucial for developers. With our new approach, we have included comprehensive documentation for all objects and parameters directly in the source code of the SDK. This means you no longer need to look up this information on the developer portal, saving you time and streamlining your development process.\n4. Enhanced Convenience Methods: Our commitment to enhancing your development experience continues with the introduction of convenience methods. These methods cover various aspects such as chunk uploads, classification, and much more.\n5. Seamless Start: The new SDKs integrate essential functionalities like authentication, automatic retries with exponential backoff, exception handling, request cancellation, and type checking, enabling you to focus solely on your application's business logic.\n\nEmbrace the new generation of Box SDKs and unlock the full potential of the Box Content Cloud.\n\n# Supported versions\n\nTo enhance developer experience, we have introduced the new generated codebase through the `BoxSdkGen` module.\nThe `BoxSdkGen` module is available in two major supported versions: v6 and v10.\n\n## Version v6\n\nIn v6 of the Box iOS SDK, we are introducing a version that consolidates both the manually written module (`BoxSDK`)\nand the new generated module (`BoxSdkGen`). This allows developers to use both modules simultaneously within a single project\n\nThe codebase for v6 of the Box iOS SDK is currently available on the [combined-sdk](https://github.com/box/box-ios-sdk/tree/combined-sdk) branch.\nMigration guide which would help with migration from `BoxSDK` to `BoxSdkGen` can be found [here](https://github.com/box/box-ios-sdk/blob/sdk-gen/migration-guides/from-BoxSDK-to-BoxSdkGen.md).\n\nVersion v6 is intended for:\n\n- Existing developers of the Box iOS SDK v5 who want to access new API features while keeping their current codebase largely unchanged.\n- Existing developers who are in the process of migrating to `BoxSdkGen`, but do not want to move all their code to the new module immediately.\n\n## Version v10\n\nStarting with v10, the SDK is built entirely on the generated `BoxSdkGen` module, which fully and exclusively replaces the old `BoxSDK` module.\nThe codebase for v10 of the Box iOS SDK is currently available on the [sdk-gen](https://github.com/box/box-ios-sdk/tree/sdk-gen) branch.\n\nVersion v10 is intended for:\n\n- New users of the Box iOS SDK.\n- Developers already working with the generated Box iOS SDK previously available under the [Box Swift SDK Gen repository](https://github.com/box/box-swift-sdk-gen).\n\n## Which Version Should I Use?\n\n| Scenario                                                                                                              | Recommended Version                                                   | Example Dependency (SPM / CocoaPods)                                                                                                         |\n| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| Creating a new application                                                                                            | Use [v10](https://github.com/box/box-ios-sdk/tree/sdk-gen)            | **SPM:** `.package(url: \"https://github.com/box/box-ios-sdk.git\", from: \"10.0.0\")`\u003cbr\u003e**CocoaPods:** `pod 'BoxSdkGen', '~\u003e 10.0.0'`          |\n| App using [BoxSdkGen](https://github.com/box/box-swift-sdk-gen)                                                       | Migrate to [v10](https://github.com/box/box-ios-sdk/tree/sdk-gen)     | **SPM:** `.package(url: \"https://github.com/box/box-ios-sdk.git\", from: \"10.0.0\")`\u003cbr\u003e**CocoaPods:** `pod 'BoxSdkGen', '~\u003e 10.0.0'`          |\n| App using both [BoxSdkGen](https://github.com/box/box-swift-sdk-gen) and [BoxSDK](https://github.com/box/box-ios-sdk) | Upgrade to [v6](https://github.com/box/box-ios-sdk/tree/combined-sdk) | **SPM:** `.package(url: \"https://github.com/box/box-ios-sdk.git\", .upToNextMajor(from: \"6.0.0\"))`\u003cbr\u003e**CocoaPods:** `pod 'BoxSDK', '~\u003e 6.0'` |\n| App using v5 of [BoxSDK](https://github.com/box/box-ios-sdk)                                                          | Upgrade to [v6](https://github.com/box/box-ios-sdk/tree/combined-sdk) | **SPM:** `.package(url: \"https://github.com/box/box-ios-sdk.git\", .upToNextMajor(from: \"6.0.0\"))`\u003cbr\u003e**CocoaPods:** `pod 'BoxSDK', '~\u003e 6.0'` |\n\nFor full guidance on SDK versioning, see the [Box SDK Versioning Guide](https://developer.box.com/guides/tooling/sdks/sdk-versioning/).\n\n# Requirements\n\n- iOS 13.0+ / Mac OS X 10.15+ / tvOS 13.0+ / watchOS 6.0+\n- Xcode 13.3+\n\n# Installing\n\nThe next generation of the SDK starts with version `10.0.0`.\n\n## Swift Package Manager\n\nThe Swift Package Manager is a tool for managing the distribution of Swift code.\nIt’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.\n\nTo add a dependency to your Xcode project, click on Xcode project file on `Packages Dependencies` and click on the plus icon to add a package.\nThen enter the following repository url https://github.com/box/box-ios-sdk.git and select the version by choosing `Up to Next Major Version` and entering `10.0.0` as the starting version.\n\nAlternatively, add the package in your `Package.swift` under the top-level `dependencies` array:\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/box/box-ios-sdk.git\", .upToNextMajor(from: \"10.0.0\"))\n]\n```\n\nThen add the `BoxSDK` product to your target's `dependencies`:\n\n```swift\n   .product(name: \"BoxSDK\", package: \"box-ios-sdk\")\n```\n\nFor detailed instructions, please see the [official documentation for SPM](https://www.swift.org/package-manager/).\n\n## Carthage\n\nCarthage is a decentralized dependency manager which builds your dependencies and provides you with binary frameworks.\n\nTo add a dependency to SDK, you need to add the following line to your `Cartfile` :\n\n```shell\ngit \"https://github.com/box/box-ios-sdk.git\" \u003e= 10.0.0\n```\n\nThen run:\n\n```shell\ncarthage bootstrap --use-xcframeworks\n```\n\nAnd finally drag the built `xcframework` from Carthage/Build into your project.\n\nFor more detailed instructions, please see the [official documentation for Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).\n\n## CocoaPods\n\nCocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.\nTo start using `BoxSDK` with CocoaPods, you need to add `BoxSDK` dependency to your `Podfile`:\n\n```shell\npod 'BoxSDK', '\u003e= 10.0.0'\n```\n\nThen run the following command in your project directory:\n\n```shell\n$ pod install\n```\n\nNow open your [project].xcworkspace and build.\n\nFor more detailed instructions, please see the [official documentation for Cocoapods](https://guides.cocoapods.org/using/using-cocoapods.html).\n\n# Getting Started\n\nTo get started with the SDK, get a Developer Token from the Configuration page of your app in the [Box Developer\nConsole](https://app.box.com/developers/console). You can use this token to make test calls for your own Box account.\n\nThe SDK provides a `BoxDeveloperTokenAuth` class, which allows you to authenticate using your Developer Token.\nUse instance of `BoxDeveloperTokenAuth` to initialize `BoxClient` object.\nUsing `BoxClient` object you can access managers, which allow you to perform some operations on your Box account.\n\n\u003e **Important:** Before using those classes, make sure to import `BoxSdkGen` module in your file.\n\nThe example below demonstrates how to authenticate with Developer Token and print names of all items inside a root folder.\n\n```swift\nimport BoxSdkGen\n\nlet auth = BoxDeveloperTokenAuth(token: \"DEVELOPER_TOKEN_GOES_HERE\")\nlet client = BoxClient(auth: auth)\n\nlet items = try await client.folders.getFolderItems(folderId: \"0\")\nif let entries = items.entries {\n    for entry in entries {\n        switch entry {\n        case let .fileMini(file):\n            print(\"file \\(file.name!) [\\(file.id)]\")\n        case let .folderMini(folder):\n            print(\"folder \\(folder.name!) [\\(folder.id)]\")\n        case let .webLinkMini(webLink):\n            print(\"webLink \\(webLink.name!) [\\(webLink.id)]\")\n        }\n    }\n}\n```\n\n# Authentication\n\nBox iOS SDK v10 supports multiple authentication methods including Developer Token, OAuth 2.0,\nClient Credentials Grant, and JSON Web Token (JWT).\n\nYou can find detailed instructions and example code for each authentication method in\n[Authentication](https://github.com/box/box-ios-sdk/blob/sdk-gen/docs/Authentication.md) document.\n\n# Documentation\n\nBrowse the [docs](https://github.com/box/box-ios-sdk/blob/sdk-gen/docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.\n\n# Migration guides\n\nMigration guides which help you to migrate to supported major SDK versions can be found [here](https://github.com/box/box-ios-sdk/tree/sdk-gen/migration-guides).\n\n# Versioning\n\nWe use a modified version of [Semantic Versioning](https://semver.org/) for all changes. See [version strategy](https://github.com/box/box-ios-sdk/blob/sdk-gen/VERSIONS.md) for details which is effective from 30 July 2022.\n\nA current release is on the leading edge of our SDK development, and is intended for customers who are in active development and want the latest and greatest features.  \nInstead of stating a release date for a new feature, we set a fixed minor or patch release cadence of maximum 2-3 months (while we may release more often). At the same time, there is no schedule for major or breaking release.\nInstead, we will communicate one quarter in advance the upcoming breaking change to allow customers to plan for the upgrade.\nWe always recommend that all users run the latest available minor release for whatever major version is in use.\nWe highly recommend upgrading to the latest SDK major release at the earliest convenient time and before the EOL date.\n\n### Version schedule\n\n| Version | Supported Environments                                  | State     | First Release | EOL/Terminated         |\n| ------- | ------------------------------------------------------- | --------- | ------------- | ---------------------- |\n| 10      | iOS 13.0+ / Mac OS X 10.15+ / tvOS 13.0+ / watchOS 6.0+ | Supported | 17 Sep 2025   | TBD                    |\n| 6       | iOS 13.0+ / Mac OS X 10.15+ / tvOS 13.0+ / watchOS 6.0+ | Supported | 23 Oct 2025   | 2027 or v7 is released |\n| 5       | iOS 11.0+ / Mac OS X 10.13+ / tvOS 11.0+ / watchOS 4.0+ | EOL       | 28 Oct 2021   | 23 Oct 2025            |\n| 4       |                                                         | EOL       | 13 Feb 2020   | 28 Oct 2021            |\n| 3       |                                                         | EOL       | 20 Nov 2019   | 13 Feb 2020            |\n\n# Contributing\n\nSee [CONTRIBUTING.md](https://github.com/box/box-ios-sdk/blob/sdk-gen/CONTRIBUTING.md).\n\n# FIPS 140-2 Compliance\n\nThe Box iOS SDK uses the CommonCrypto library, which relies on Apple's corecrypto cryptographic module. This module has undergone multiple validations by the Cryptographic Module Validation Program (CMVP) and is confirmed to be compliant with FIPS 140-2 standards. For further information, please refer to [Apple's security certification](https://support.apple.com/en-gb/guide/certifications/apc30d0ed034/web) and [iOS security certifications](https://support.apple.com/en-gb/guide/certifications/apc3fa917cb49/1/web/1.0).\n\n# Questions, Bugs, and Feature Requests?\n\nNeed to contact us directly? [Browse the issues tickets](https://github.com/box/box-ios-sdk/issues)! Or, if that\ndoesn't work, [file a new one](https://github.com/box/box-ios-sdk/issues/new) and we will get\nback to you. If you have general questions about the Box API, you can post to the [Box Developer Forum](https://community.box.com/box-platform-5).\n\n# Copyright and License\n\nCopyright 2025 Box, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-ios-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbox%2Fbox-ios-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-ios-sdk/lists"}