Update your Xcode project to use a new Reader SDK framework by running two Ruby package management scripts in a terminal session.
Requirements and limitations
Complete the steps in Build on iOS to configure and build an Xcode project that uses the Reader SDK framework and on which 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.
Get the following information from the Developer Console:
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.
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.
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}
Replace {APP_ID}
and {REPO_PASSWORD}
with your ID and password.
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
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:
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.
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}
Replace {APP_ID}
, {REPO_PASSWORD}
, and {VERSION}
(such as 1.7.5) with your ID, the Square repository password, and the desired framework version.
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.