Square’s Register API is now Point of Sale API

We recently announced a new name for the Square Register app to better reflect everything it can do to help run your business: Square Point…

We recently announced a new name for the Square Register app to better reflect everything it can do to help run your business: Square Point of Sale. You can use the app to take payments, track sales, manage customers and employees, and more — everything you need from a complete point of sale.

As part of this broader change, we are also renaming Register API to Point of Sale API. The Square Point of Sale API uses inter-app communication to let your Android or iOS app open the Square Point of Sale app to process in-person payments with Square hardware (including the Square contactless and chip reader).

What does this mean?

You will see this name change reflected across our documentation and other developer tools:

To ensure that you always have the latest version of our open source SDKs, just update your build dependencies and update your code as outlined below.

Android Updates

On Android, we have updated the framework name and Github repository and have also created a new Maven artifact. The API itself has been updated to version 2.0, which is supported in Square Point of Sale 4.64 or later (simply update the app to make sure you are on the latest version).

If you want to upgrade your project to take advantage of future releases (there are no new features in the 2.0 version itself, other than the name change), follow the instructions in the sections below. Once you upgrade, you should update your code as follows to reflect the name changes:

  • Replace references to the com.squareup.sdk.register package with com.squareup.sdk.pos

  • Replace references to the RegisterClient interface with PosClient

  • Replace references to the RegisterApi class with PosApi

  • Replace references to the RegisterSdk class with PosSdk

  • Replace references to the isRegisterInstalled() method with isPointOfSaleInstalled()

  • Replace references to the launchRegister() method with launchPointOfSale()

  • Replace references to the openRegisterPlayStoreListing() method with openPointOfSalePlayStoreListing()

If you are using the Web API to initiate a Square Point of Sale transaction from your website, you can change your web intent keys to replace com.squareup.register with com.squareup.pos (note that this is not compulsory, since the Point of Sale app will remain backwards compatible).

Gradle

To update the SDK, replace com.squareup.sdk:register-sdk:1.2 with com.squareup.sdk:point-of-sale-sdk:2.0 as a dependency in your build.gradle:

dependencies {

  compile 'com.squareup.sdk:point-of-sale-sdk:2.0'

}

Maven

To update the SDK, replace com.squareup.sdk.register-sdk version 1.2 with com.squareup.sdk.point-of-sale-sdk version 2.0 as a dependency in your pom.xml:

<dependency>

  <groupId>com.squareup.sdk</groupId>

  <artifactId>point-of-sale-sdk</artifactId>

  <version>2.0</version>

  <type>aar</type>

</dependency>

iOS Updates

On iOS, we have updated the framework name and Github repository. We have also created a new CocoaPod and deprecated the original pod.

If you’re using our SDK in your native app, you’ll need to update your references to the SDK. Note that method signatures have not changed, so your code requires no change other than updating import declarations. If you built a web app using the Point of Sale API, or if your native app builds its own requests using the square-commerce-v1:// URL scheme, no changes are required to support the rename.

In order to upgrade your project, follow the instructions below.

CocoaPods

  • Update your app’s Podfile by replacing any SquareRegisterSDK** **entries with SquarePointOfSaleSDK:
platform :ios, '9.0'

target 'MyApp' do

  pod 'SquarePointOfSaleSDK'

end
  • Run: pod install —-repo-update

  • Update import declarations to import SquarePointOfSaleSDK (Swift) or @import SquarePointOfSaleSDK (Objective-C)

Carthage

  • Update your app’s Cartfile by replacing any github “Square/SquareRegisterSDK-iOS”** **entries with github “Square/SquarePointOfSaleSDK-iOS”

  • Run: carthage update SquarePointOfSaleSDK --platform --iOS

  • Drag and drop $(SRCROOT)/Carthage/Build/iOS/SquarePointOfSaleSDK.framework to all applicable targets under General -> Linked Frameworks and Libraries; remove any SquareRegisterSDK.framework entries

  • Update any build script input file paths, e.g. $(SRCROOT)/Carthage/Build/iOS/SquarePointOfSaleSDK.framework

  • Update import declarations to import SquarePointOfSaleSDK (Swift) or @import SquarePointOfSaleSDK (Objective-C)

Git Submodules

These instructions apply only to projects that have previously added the SquareRegisterSDK-iOS repository as a Git submodule. Otherwise, follow these instructions to add the SDK as a submodule.

**Note: **Github forwards all SSL and HTTPS requests from the old URL to the new URL. Remote repository URLs do not need to be updated.

  • Pull the latest version:
cd <SquareRegisterSDK-iOS submodule directory>

git checkout master && git pull
  • This will update the SDK’s XCode project name to SquarePointOfSaleSDK.xcodeproj

  • Open your app’s project or workspace in XCode

  • Replace SquareRegisterSDK.xcodeproj** **with SquarePointOfSaleSDK.xcodeproj in the XCode file explorer

  • Replace SquareRegisterSDK.framework with SquarePointOfSaleSDK.framework** **in any target build dependencies

Learn more

You can always learn more about the Square APIs in the documentation. Don’t hesitate to reach out if you have any questions!

Table Of Contents