Getting Started with RevTwo Sample App

This section will go over how to download and run the app.

You can download the sample app from our GitHub

RevTwoSample app has a deployment target of 8.4 so make sure you have updated xcode and are running Yosemite or greater on your mac.

New to CocoaPods?  Here is how to install

CocoaPods is a dependency manager for Swift and Objective C projects.  To learn more, see the full CocoaPods documentation.  If you already have CocoaPods installed, you can skip this section.

CocoaPods is built with Ruby and is installable with the default Ruby available on OS X.  To install CocoaPods run the command in terminal:

$ sudo gem install cocoapods

Download the Sample App and Install the RevTwo library

  1. Clone the RevTwoSample app from GitHub
  2. Now navigate to your project in the terminal and run the command:
    $ pod install

This will install the latest RevTwo library in the Sample app.

Add Your App Key

  1. Log into your account at and go to your app models page.  Click on the RevTwoSample app logo.
  2. Clicking on the app takes you to the definition page of the app.  Here you can edit an app’s info and change which widgets are enabled on the app.  For now, we just need the app key.  Scroll down to the iOS section.
  3. Now open up the RevTwoSample.xcworkspace in xcode.
    The Sample app uses cocoapods, so it is important to open the workspace, not the xcode project.
  4. Open AppDelegate.m and add your app code in the R2Initialize function
  5. Run the app on your device or simulator and it will register with RevTwo Portal.
  6. Go to the Developer tab and you will see your device or simulator in the list.

App Code Overview

The RevTwoSample App is a simple app written in Objective C.  The RevTwo In-App Support library is already added to the app.  Once you have added your product key, RevTwoSample will be all set to communicate with your account.

The goal of RevTwoSample is to demonstrate the functionality offered by the RevTwo In-App Support library.  Using this app will give you a platform to see the library in action and easily find examples of how to use various features.

For simplicity, all the views for the app have been added into Main.storyboard

Each tutorial is contained in its own class under the Tutorials folder.  The tutorials in this folder cover the RevTwo features that will require some work by the app developer.  All other functionality, such as screen sharing, is provided with no additional work by the developer.  The following sections will cover these tutorials in greater detail.

There is another folder filled with various sample files.  On start up, the app copies these files into your app’s document directory.  These files are just to demonstrate the file browsing capabilities offered by RevTwo In-App Support library.

Push Notifications

If you would like to set up push notifications on the sample app, you will need to change the Bundle ID and team in Xcode.  After you have set this to your own information, follow this tutorial on setting up push notifications.