The Button SDK is the development kit that is used to integrate Button commerce functionality into your app.

We routinely update the Button SDK with new features and improved performance. It's recommended that you update it when there are new versions available. On occasion, we may pro-actively request that you perform an update, for example coinciding with major version updates of iOS or Android.

If you're trying to set up the Button SDK see [Add the Button SDK](https://button-api.readme.io/docs/native-app-setup)

# Safety

The Button SDK strictly follows [semantic versioning](https://semver.org/) and is extensively tested.

**It is always safe, and will require no code changes to update within the same major version. e.g. 6.32 -> 6.33**

You may need to make a code change to update to a new major version e.g. 7.0

# Android

## Gradle

If you added the Button SDK with a fuzzy version e.g. `6+` then you can simply allow Gradle to update the version of the Button SDK by refreshing dependency versions either in the UI through "Refresh Gradle Dependencies" via .

Alternatively, in the console:

```undefined
./gradlew build --refresh-dependencies
```

If you specified a version explicitly in your `build.gradle` file, you will need to update the line to either match `6+` or explicitly state the latest version.

# iOS

## CocoaPods

If you added the Button SDK with a fuzzy version e.g. `~> 6` then you can simply update with `pod update Button`

Swift

```swift
pod update Button
```

If you specified a version explicitly in your `Podfile`, you will need to update the line to either match `~> 6` or explicitly state the [latest version](https://github.com/button/button-ios/releases/latest)

## Swift Package Manager

In Xcode, navigate to **File** → **Add Package Dependency** → **Add Package Dependencies...** and enter the following repository url in the search bar and set the minimum version to the [latest version](https://github.com/button/button-ios/releases/latest)

`https://github.com/button/button-ios`

## Carthage

If you added the Button SDK with a fuzzy version e.g. `~> 6.0` then you can simply update with `carthage update`

Swift

```swift
carthage update button-ios
```

If you specified a version explicitly in your `Cartfile`, you will need to update the line to either match `~>6` or explicitly state the [latest version](https://github.com/button/button-ios/releases/latest)

> 📘
>
> ### Be sure to verify your dependency manager pulled in the [latest version](https://github.com/button/button-ios/releases/latest) or alternatively you can check at runtime by calling `Button.version()`

Updated about 1 year ago

* * *
