Merchant Library Updates

The Button Merchant Library is a light-weight open-source library that is used to integrate your app with Button for attribution, measurement, optimization and personalization use-cases.

From time-to-time, we update the Button Merchant Library with new features or to improve performance. It's recommended that you update it when there are new versions available. On occassion 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 Merchant Library see Add the Button Merchant Library

Safety

The Merchant Library strictly follows semantic versioning and is extensively tested.

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

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

Android

Gradle

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

Alternatively, in the console:

./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 1+ or explicitly state the latest version (currently )

iOS

Cocoapods

If you added the Merchant Library with a fuzzy version e.g. ~> 1 then you can simply update with pod update ButtonMerchant

pod update ButtonMerchant

If you specified a version explicitly in your Podfile, you will need to update the line to either match ~> 1 or explicitly state the latest version (currently )

Carthage

If you added the Merchant Library with a fuzzy version e.g. ~> 1.0 then you can simply update with carthage update

carthage update button-merchant-ios

If you specified a version explicitly in your Cartfile, you will need to update the line to either match ~>1 or explicitly state the latest version (currently )

Swift Package Manager

In your Xcode Project, navigate to:

File → Swift Packages → Update to Latest Package Versions

Note: If you specified a rule other than "Up to Next Major" in your Swift Package settings, you will need to update this by navigating to Project Settings → Swift Packages and double clicking on Button Merchant