sbt-robovm is a plugin for the Scala build tool that aims to make it as simple as possible to compile Scala (and Java) code to binaries for iOS, linux, and OSX using RoboVM (version 1.0.0-alpha-04)
NOTE Due to a bug in LLVM, most samples will fail to build for the simulator unless run through ProGuard first. The sample projects show how to set that up, but your builds will take much longer. Testing on an actual device is recommended until the bug is fixed. See RoboVM issue #313 for updates.
- Changed the organization from
com.hagerbot
toorg.roboscala
- Install Xcode 6.x
- Install JDK 7
- Install sbt
- Download and extract robovm-1.0.0-alpha-04.tar.gz to one of these places:
- ~/Applications/robovm/
- ~/.robovm/home/
- /usr/local/lib/robovm/
- /opt/robovm/
- /usr/lib/robovm/
- See roboscala-samples for project creation and configuration
$ sbt ios/device
$ sbt ios/iphone-sim
$ sbt ios/ipad-sim
$ sbt ios/ipa
$ sbt ios/simulator
The simulator
task will run the program on device specified by the simulatorDevice
setting key. For example: RobovmPlugin.simulatorDevice := Some("iPad-Air, 7.1")
To see all installed simulators, run $ sbt simulator-devices
.
You can download simulators for more iOS versions in Xcode. (Xcode includes only the latest iOS simulator by default.)
If you are using the plugin to build a native desktop project:
$ sbt project-name/native
The first time you try to compile a program, RoboVM must compile the Java and Scala standard libraries. This can take a few minutes, but the output of this process is cached. Subsequent compilations will be much faster.
If you are having issues after installing Xcode, open Xcode and agree to the license or open a Terminal and run xcrun.
If you need to make modifications to the plugin itself, you can compile and install it locally:
$ git clone git://github.com/roboscala/sbt-robovm.git
$ cd sbt-robovm
$ sbt publish-local