Site Tools


RhinoMobile - Getting Started

First, you need to decide whether you will be developing in Windows or on a Mac. This may come down to what you have available, or personal preference/familiarity, but it is important to remember that there are tradeoffs on both sides. For example, if you choose Windows and you wish to target iOS, you will need to have a Mac running Xcode and use Visual Studio Professional Edition. Similarly, if you choose a Mac as your primary development environment and you wish to target WindowsPhone, you will still need to have a Windows PC.

If you wish to use a Mac as your primary development computer, you will have to use Xamarin Studio which targets Android and iOS.

In Windows, you can choose between Xamarin Studio or Visual Studio. If you choose Xamarin Studio in Windows, you can build and deploy to Android and WindowsPhone. Users of Visual Studio can build and deploy to Android, iOS (over a network with a Mac “build box” attached), and WindowsPhone.

No matter what you decide, remember that Xamarin Studio writes a standard Visual Studio project file, so you can open your Solutions and Projects on either platform, with either IDE.

The following presumes you will be using Xamarin Studio on Mac and/or Visual Studio in Windows.


Mac OS X Step-by-Step Instructions

  1. Download and install Xamarin. Download the Xamarin Starter Edition. Install the Mono Framework, the Android SDK, Xamarin Studio, Xamarin.Android and Xamarin.iOS (Xamarin.Mac is optional). Once Xamarin Studio and all the associated tools are installed, start Xamarin Studio and make sure it is up-to-date. On the upper toolbar, navigate to Xamarin Studio > Check for Updates. Update and restart Xamarin Studio.
  2. Update the Android SDK. Once Xamarin Studio itself has been updated, you need to fetch the updates for the Android SDK. In Xamarin Studio, navigate to Tools > Open Android SDK Manager… In the Android SDK Manager window, wait until manager has finished fetching the update manifest. Depending on when you downloaded the Xamarin tools, you will want to install the most recent API (19 at the time of writing) as well as the last couple (18 and 17) for backward compatibility. Select the small check boxes next the names and then click Install N packages… button. This brings up a (very buggy) window in which you must accept all the licenses of each item before continuing. If you can't get the Install button to work, exit out of the window, open it again, and individually click the Accept radio button on the left until it works. Downloads can take awhile depending on your internet connection.
  3. Download and install Xcode. Xcode is free and can be downloaded from the App Store on and Apple Mac running OS X Mountain Lion or above. Once Xcode is installed, you will need to get the Xcode command-line tools. If the Command Line Tools does not appear in the Components Section, it is likely your Xcode came bundled with the Command Line Tools already. In Xcode 4.3 to 5.0, Xcode Command Line Tools do not come pre-installed, but need to be downloaded from within Xcode. (Xcode > Preferences > Downloads Tab > Components Section > Command Line Tools > small download arrow):
  4. Download and install the Intel Hardware Acceleration Execution Manager (HAXM): HAXM provides a hardware-accelerated engine for the x86 Android emulators. Without HAXM, the emulators are nearly unusable, as their performance lags so much. However, with HAXM, the x86 emulators are responsive and usable. Not as fast as an actual device, but at least passable. It’s available to install via the Android SDK manager, but the version there is ineffective. Instead, get it from the link above. Note that you’ll want to install the revised version available on that page. HAXM will not work in a virtualized environment, e.g. a VM, so if you’re doing your Android development in a Windows VM, you will need to use a device. NOTE: If you are using Mac OS X 10.9 (Mavericks), make sure you install the hotfix version.
  5. Download or Clone RhinoCommon. You can either download RhinoCommon as a zip or clone the repository using git (recommended). (If you are new to GitHub, there is a GitHub Mac App to get you started). Unzip or clone rhinocommon in a convenient folder, such as /Users/<you>/Development/Repositories/rhinocommon:
  6. Download openNURBS. RhinoMobile requires the C++ openNURBS SDK. Unzip openNURBS and place the contents in the rhinocommon/c/opennurbs/ folder (the folder containing only the readme.md file):
  7. Download or Clone RhinoMobile. Unzip or clone RhinoMobile into a folder parallel to rhinocommon. For example, if rhinocommon is in the /Users/<you>/Development/Repositories/rhinocommon folder, then RhinoMobile should be in the /Users/<you>/Development/Repositories/RhinoMobile folder:
  8. Download or Clone RhinoMobileSamples. Unzip or clone RhinoMobileSamples into a folder parallel to rhinocommon and RhinoMobile:
  9. Build openNURBS for iOS. Open a Terminal window. Change directories to the rhinocommon/c folder. Run the build_mobile.sh script with the ios argument (./build_mobile.sh ios). This script runs a pre-build check to see if you have the proper pre-requisites installed, then builds four different versions of libopennurbs: two arm architectures, one x86 for the simulator, and one universal bundle. Once the libraries have been built, move the libopennurbs*.a files into the RhinoMobileSamples/HelloRhinoMobile/HelloRhino.Touch/libs folder.
  10. Build openNURBS for Android. In a Terminal window, make sure you are in the rhinocommon/c folder. Run the build_mobile.sh script with the android argument (./build_mobile.sh android). This script runs a pre-build check to see if you have the proper pre-requisites installed, then builds three different versions of libopennurbs: two arm architectures and one x86 for the emulator. Once the libraries have been built, move the libs folder into the RhinoMobileSamples/HelloRhinoMobile/HelloRhino.Droid folder:

If you've completed the steps above, you're ready to build your first app: HelloRhinoMobile.


Windows 8.1 Step-by-Step Instructions

  1. Download and Install Xamarin. Download the Xamarin Starter Edition. The installer should install the Mono Framework, the Android SDK, Xamarin Studio, Xamarin.Android and Xamarin.iOS (Xamarin.Mac is optional). Once Xamarin Studio and all the associated tools are installed, start Xamarin Studio and make sure it is up-to-date. Navigate to Help > Check for Updates. Update and restart Xamarin Studio:
  2. Update the Android SDK. Once Xamarin Studio itself has been updated, you need to fetch the updates for the Android SDK. In Xamarin Studio, navigate to Tools > Open Android SDK Manager… In the Android SDK Manager window, wait until manager has finished fetching the update manifest. (Note: you may need to run the SDK manager as Administrator. The default path to the Android SDK is: C:\Users\<you>\AppData\Local\Android\android-sdk). Depending on when you downloaded the Xamarin tools, you will want to install the most recent API (19 at the time of writing) as well as the last couple (18 and 17) for backward compatibility. Select the small check boxes next the names and then click Install N packages… button. This brings up a (very buggy) window in which you must accept all the licenses of each item before continuing. If you can't get the Install button to work, exit out of the window, open it again, and individually click the Accept radio button on the left until it works. Downloads can take awhile depending on your internet connection.
  3. Download and install Xcode. (NOTE: This step is optional and only required if you want to build for iOS. You will need to preform this step on your Mac build box running OSX). Xcode is free and can be downloaded from the App Store on and Apple Mac running OS X Mountain Lion or above. Once Xcode is installed, you will need to get the Xcode command-line tools. In Xcode 4.3 and later, Xcode Command Line Tools do not come pre-installed, but need to be downloaded from within Xcode. (Xcode > Preferences > Downloads Tab > Components Section > Command Line Tools > small download arrow): If the Command Line Tools does not appear in the Components Section, it is likely your XCode comes bundled with the Command Line Tools already.
  4. Download and install the Intel Hardware Acceleration Execution Manager (HAXM): HAXM provides a hardware-accelerated engine for the x86 Android emulators. Without HAXM, the emulators are nearly unusable, as their performance lags so much. However, with HAXM, the x86 emulators are responsive and usable. Not as fast as an actual device, but at least passable. It’s available to install via the Android SDK manager, but the version there is ineffective. Instead, get it from the link above. HAXM will not work in a virtualized environment, e.g. a VM, so if you’re doing your Android development in a Windows VM, you will need to use a device. NOTE: If you are using Windows 8.1, make sure you install the hotfix version.
  5. Download or Clone RhinoCommon. You can either download RhinoCommon as a zip or clone the repository using git (recommended). (If you are new to GitHub, there is a GitHub Windows App to get you started). Unzip or clone rhinocommon in a convenient folder, such as C:\Users\<you>\Development\Repositories\rhinocommon:
  6. Download openNURBS. RhinoMobile requires the C++ openNURBS SDK. Unzip openNURBS and place the contents in the rhinocommon\c\opennurbs folder (the folder containing only the readme.md file):
  7. Download or Clone RhinoMobile. Unzip or clone RhinoMobile into a folder parallel to rhinocommon. For example, if rhinocommon is in the C:\Users\<you>\Development\Repositories\rhinocommon folder, then RhinoMobile should be in the C:\Users\<you>\Development\Repositories\RhinoMobile folder:
  8. Download or Clone RhinoMobileSamples. Unzip or clone RhinoMobileSamples into a folder parallel to rhinocommon and RhinoMobile:
  9. Download openNURBS mobile binaries. Building the openNURBS mobile binaries for Android is difficult (but possible*) on Windows. For convenience purposes, we have provided pre-built binaries for iOS and Android that you can use in your project on the Windows side. Once these binaries have been downloaded, move the iOS libopennurbs.a files into the RhinoMobileSamples\HelloRhinoMobile\HelloRhino.Touch\libs folder for iOS and the libs folder into the RhinoMobileSamples\HelloRhinoMobile\HelloRhino.Droid folder for Android:

If you've completed the steps above, you're ready to build your first app: HelloRhinoMobile.

*For those interested in building the openNURBS Android libraries on Windows: this requires a linux emulator for Windows such as Cygwin, the Android NDK tools (which come bundled with Xamarin), as well as gcc, g++ and make utilities running in Cygwin. Detailed build instructions are beyond the scope of this how-to). Remember that building the openNURBS mobile binaries for iOS requires a Mac and Xcode (follow instructions 9 and 10 from the Mac instructions above to perform both iOS and Android builds on a Mac - the resulting binaries can be simply copied over from your Mac to Windows development computer).

developer/rhinomobile/getting_started.txt · Last modified: 2014/01/23 (external edit)