On device debugging for iOS!

We’re proud to announce the latest version of the DukeScript archetypes has been released to Maven Central. The greatest new feature is support for on-device debugging on iOS. If you have installed the NetBeans Plugin, the new archetypes will be used automatically. So you don’t need to install or update anything. Just create a new project.

In order to get debugging to work, you will need a license from RoboVM (There’s a 14 day trial available). After installing your license, simply start your app using the “debug” action in the projects context menu. This will launch your app in the iPad Simulator. To debug on an iOS device connected to your Mac, switch to the “Files” tab and add this to your nbactions.xml:

     <action>
        <actionName>CUSTOM-debug-on-device</actionName>
        <displayName>Debug on iOS Device</displayName>

        <goals>
            <goal>package</goal>
            <goal>robovm:ios-device</goal>
        </goals>
        <properties>
            <skipTests>true</skipTests>
            <robovm.debug>clientmode</robovm.debug>
            <robovm.debugPort>${jpda.address}</robovm.debugPort>
            <jpda.listen>true</jpda.listen>
        </properties>
    </action>

This will add a new entry “Debug on iOS Device” to the “Custom”-submenu. The new task will automatically be available in the upcoming release of the DukeScript NetBeans Plugin.

If you prefer creating your projects from the command-line, the version number is 0.9.

Use this Archetype to create a basic application:

mvn archetype:generate \
	-DarchetypeGroupId=com.dukescript.archetype \
	-DarchetypeArtifactId=knockout4j-archetype \
	-DarchetypeVersion=0.13 # or newer version

The second archetype creates a CRUD application that shows how you can do client-server communication and reuse Model code on both ends:

mvn archetype:generate \
	-DarchetypeGroupId=com.dukescript.archetype \
	-DarchetypeArtifactId=crud4j-archetype \
	-DarchetypeVersion=0.13 # or newer version

For on device debugging with Android, you’ll have to wait for NetBeans 8.1. The archetypes support it already. If you can’t wait, use a development build of NetBeans.

The Source Code of the new version of the presenters is available on Github:

https://github.com/dukescript/dukescript-presenters

We have also published the sources for the Maven Archetypes:

https://github.com/dukescript/maven-archetypes