Getting Started

Build Apps for Sphero, Ollie and future Sphero robots very quickly using the iOS, OSX, Android, and Unity Sphero Robot SDKs. iOS & Android are available for download below while the OSX and Unity SDKs are made available on request. Numerous 3rd party SDKs exist as well and are made available in the Community APIs section by their developers.

Edit this section

There are two ways to get started with the RobotKit SDK, simply exploring samples in the RobotKit SDK or by integrating the RobotKit SDK into your own project. The steps below are for integrating into your own project.

iOS Prerequisites

  • The iOS RobotKit SDK is compatible with iOS 7.0+
  • RobotKit SDK applications will not work in the emulator due to the dependency on Bluetooth

1. Install Xcode

  • If you don't have Xcode installed use the install link above.

2. Download RobotKit SDK

3. Add RobotKit SDK to your Xcode Project

  • Add Frameworks
    • Navigate to your RobotKit SDK download
    • Drag and drop the following frameworks into the project (Note: Ensure the option Copy files if needed is checked before clicking Add):
      • Required
        • RobotKit.framework
      • Optional
        • RobotUIKit.framework
        • RobotUIKit.bundle
  • Set Deployment Target to 7.0+ in the General tab
  • Set Background Capabilities
    • Open Capabilities tab
    • Enable Background Modes and check Uses Bluetooth LE accessories
    • note: this setting allows Robots to sleep + disconnect while the app is closing
  • Update Build Settings
    • Open Build Settings tab
    • Search for "Other Linker Flags"
    • Add -ObjC -lc++
  • Update Info.plist
    • Add UISupportedExternalAccessoryProtocols key
    • Add com.orbotix.robotprotocol entry
  • Build Project
    • Change the device target from iOS Simulator to iOS Device (or the name of the connected iOS device)
    • Press the play button or CMD+B

4. Integrate Connection and Commands

Edit this section

There are two ways to get started with the RobotKit SDK, simply exploring samples in the RobotKit SDK or by integrating the RobotKit SDK into your own project. The steps below are for integrating into your own project.

iOS Prerequisites

  • The iOS RobotKit SDK is compatible with iOS 7.0+
  • RobotKit SDK applications will not work in the emulator due to the dependency on Bluetooth

1. Install Xcode

  • If you don't have Xcode installed use the install link above.

2. Download RobotKit SDK

3. Add RobotKit SDK to your Xcode Project

  • Add Frameworks
    • Navigate to your RobotKit SDK download
    • Drag and drop the following frameworks into the project (Note: Ensure the option Copy files if needed is checked before clicking Add):
      • Required
        • RobotKit.framework
      • Optional
        • RobotUIKit.framework
        • RobotUIKit.bundle
  • Set Deployment Target to 7.0+ in the General tab
  • Set Background Capabilities
    • Open Capabilities tab
    • Enable Background Modes and check Uses Bluetooth LE accessories
    • note: this setting allows Robots to sleep + disconnect while the app is closing
  • Update Build Settings
    • Open Build Settings tab
    • Search for "Other Linker Flags"
    • Add -ObjC -lc++
  • Update Info.plist
    • Add UISupportedExternalAccessoryProtocols key
    • Add com.orbotix.robotprotocol entry
  • Generate bridging header
    • The automatic method:
      • Add new Objective-C file (File > New > File). Select Objective-C File
      • When prompted to create the bridging header select Yes
      • Add #import <RobotKit/RobotKit.h> to the header
    • The manual method: (If you declined the prompt once before this is your only option)
      • Create a new header file (File > New > File). Select Header File
      • Name the header YourProjectName-Bridging-Header.h
      • Open the project Build Settings and navigate to the Swift Compiler – Code Generation section
      • Add the path to your newly created header next to Objective-C Bridging Header
      • Add #import <RobotKit/RobotKit.h> to the header
  • Build Project
    • Change the device target from iOS Simulator to iOS Device (or the name of the connected iOS device)
    • Press the play button or CMD+B

4. Integrate Connection and Commands

Edit this section

Android Prerequisites

  • Android Studio requires JDK 1.7 even though the Robot SDK supports down to 1.6
  • The Sphero Android SDK works with Android 3.1+ (API level 12) and Java Compiler Level 6.0(1.6)+
  • The Ollie Android SDK works with Android 4.3+ (API level 18) and Java Compiler Level 6.0(1.6)+
  • RobotLibrary SDK applications will not work in the emulator due to the dependency on Bluetooth

1. Install Android Studio + JDK 1.7

Before you begin to develop applications that interface with robots on Android, you will need to install the Android developer tools and an IDE. In this guide we will use Android Studio since Eclipse is no longer supported for Android development. There are many other well written Android IDEs out there and these configuration steps are most often still applicable.

2. Download RobotLibrary SDK

3. Add RobotLibrary SDK to your Android Studio Project

  • Copy Library to Project
    • Navigate to your RobotLibrary SDK
    • Drag and drop the RobotLibrary.jar into the libs folder inside the project. It is okay to create this folder if it does not exist.
  • Add Library as a Dependency

    • Open the build.gradle file for the project
    • Under dependencies add this line if it does not exist compile fileTree(dir: 'libs', include: ['*.jar'])
  • Add Bluetooth Permissions

    • Open the AndroidManifest.xml file for the project
    • Add the BLUETOOTH and BLUETOOTH_ADMIN permissions

4. Integrate Connection and Commands