Update your Project to a New Reader SDK Version

Update your Xcode project to use a new Reader SDK framework by running two Ruby package management scripts in a terminal session.

This topic assumes that you've followed the steps in Build on iOS to configure and build an Xcode project that uses the Reader SDK framework and you want to install a new version of the framework.

Did you know?

If your application is running on an iOS 14 (2.14) device, your application might have difficulty pairing with a Square Reader. In this case, you must update your Reader SDK version to the newest version.

Link to section

Before you start

To use the steps in this guide, get the following information from the Developer Dashboard:

  • Your application ID - Find your application ID on the Credentials page of your Square application.

  • Your Reader SDK repository password - Find your Reader SDK repository password on the Reader SDK page of your Square application.

You paste the ID and password into each script to give them access to the Square Reader SDK repository.

Link to section

List Reader SDK versions

Get the available Square Reader SDK versions by running a script that returns a list of Reader SDK version numbers. You can run this script in any folder.

  1. Paste the following command at the terminal prompt:

    ruby <(curl https://connect.squareup.com/readersdk-installer ) list-versions --app-id {APP_ID} --repo-password {REPO_PASSWORD}
  2. Replace {APP_ID} and {REPO_PASSWORD} with your ID and password.

  3. Run the command.

    After the script finishes, you see terminal output like the following:

    Square Reader SDK Versions: * 1.6.8 * 1.6.7 * 1.6.6
Link to section

Install a new version of the framework

The existing SquareReaderSDK.framework file should be found in the root folder of your project. Run the following Ruby script in this folder.

Install the new Reader SDK framework with these steps:

  1. Delete the existing SquareReaderSDK.framework.

    rm -r ~/{YOUR_PROJECT_PATH}/SquareReaderSDK.framework

    Note

    This is a recursive delete command that deletes the target folder (SquareReaderSDK.framework) and all child objects. Be careful when using rm -r on other folders.

  2. Paste the following command at the terminal prompt:

    ruby <(curl https://connect.squareup.com/readersdk-installer ) install --app-id {APP_ID} --repo-password {REPO_PASSWORD} --version {VERSION}
  3. Replace {APP_ID}, {REPO_PASSWORD}, and {VERSION} (such as 1.6.8) with your ID, the Square repository password, and the desired framework version.

  4. Run the command.

    After the Ruby script finishes, you see the following terminal output:

    [100.0% complete] [###############...######] Installed version {VERSION}: /{YOUR_PROJECT_PATH}/{PROJECT_ROOT_FOLDER}/SquareReaderSDK.framework

You can now build and run your project with the newly installed Reader SDK.