Coder Social home page Coder Social logo

monotouch-maven-plugin's Introduction

monotouch-maven-plugin

This Maven plugin invokes mdtool and mtouch to build and deploy a MonoTouch project to the iOS simulator or to a device. It was created to make life easier for PlayN projects, but there's nothing particularly PlayN-specific about it.

Usage

The plugin provides two main goals, one to build and deploy to the simulator and one to build and deploy to a device. The only required configuration for the plugin is the solution (or csproj). Adding this in your <build><plugins> section:

<plugin>
  <groupId>com.samskivert</groupId>
  <artifactId>monotouch-maven-plugin</artifactId>
  <version>1.1</version>
  <configuration>
    <solution>YOUR.sln</solution>
  </configuration>
</plugin>

will allow you to deploy to device with this simple command line:

mvn monotouch:deploy-device

or to the simulator

mvn monotouch:deploy-sim

Additional configuration will probably be needed such as the device family or launch orientation. This can be specified in the configuration for the plugin or overridden on the command line as needed.

For a complete description of all the options, look at the source or in the maven help:

mvn help:describe -Dplugin=com.samskivert:monotouch-maven-plugin -Ddetail

This plugin works nicely with ikvm-maven-plugin, which converts your Java code to a .dll during the package phase. Thus you can compile your Java code, convert it via IKVM, and then build and test/deploy your MonoTouch project in a single Maven call, where X is deploy-sim or deploy-device:

mvn package monotouch:deploy-X

NOTE: in older versions, binding to a lifecycle phase was recommended. It is not necessary to do, but if desired, you can add something like this to the plugin tag:

<executions>
  <execution>
    <phase>integration-test</phase>
    <goals>
      <goal>deploy-sim</goal>
    </goals>
  </execution>
</executions>

This will run the plugin on every integration test or anything after it in the lifecycle, so you'll almost certainly want to put this in a manually activated profile.

By default, launching to the simulator is done using mtouch, but you can also use the ios-sim app, which is nicer because it sends stdout from your iOS app to stdout on the console (which mtouch does not). You can enable the use of ios-sim by providing the path to the ios-sim binary in <configuration>:

<configuration>
  <iossimPath>/usr/local/bin/ios-sim</iossimPath>
</configuration>

Advanced Usage

It's also possible to use this plugin to compile and package ios bindings. Said package can then be included in other ikvm projects. The configruation is similar to the other goals. The solution or csproj file is required input. When adding the plugin to a bindings build, it is required to add <extensions>true</extensions> in the body of the <plugin> tag.

License

monotouch-maven-plugin is released under the New BSD License, which can be found in the LICENSE file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.