lein-fruit

Plugin for easy Clojure/iOS development and deployment


License
Unlicense

Documentation

This project is no longer being actively maintained.

Introduction

A Leiningen plugin for building native iOS apps in Clojure and Java using the RoboVM bytecode-to-native translator. It is modeled after lein-droid and the commands are similar. Both plugins are included in Nightcode, for those who prefer not using the command line. The programming is done by using RoboVM's wrapper classes, as shown in the built-in template. Please note that REPL development and any use of eval is not supported.

Installation

  1. Get a computer running Mac OS X
  2. Install Xcode
  3. Install JDK 8
  4. Download and extract robovm-1.4.0.tar.gz
  5. Install Leiningen, and create or modify ~/.lein/profiles.clj so it looks like this:
{:user {
    :plugins [[lein-fruit "0.2.3"]]
    :ios {:robovm-path "/absolute/path/to/robovm-1.4.0"}
}}

Usage

# Create a new Clojure/iOS project
lein fruit new hello-world
# ...or a new Java/iOS project
lein fruit new-java hello-world
# You may optionally specify a package name
lein fruit new-java hello-world net.sekao.hello_world

# Build an x86 version and run in a simulator
lein fruit doall
# ...which is the same thing as
lein fruit compile && lein fruit run
# Use the iPad simulator
lein fruit doall -devicetype "iPad-Air, 8.1"

# Build an ARM version
lein fruit release
# ..which is the same thing as
lein fruit compile && lein fruit ipa
# Show RoboVM flags (all flags are passed to it)
lein fruit help

Licensing

All files that originate from this project are dedicated to the public domain. I would love pull requests, and will assume that they are also dedicated to the public domain.