Christmas 2017 is here and a new version of DukeScript archetypes brings a new way to launch your application on iOS.
Version 0.20 gives you support for Multi OS Engine!
How hard is it to try? Easy, fairly easy. First of all use one of the Maven archetypes to create and build your project:
$ mvn archetype:generate \ -DarchetypeGroupId=com.dukescript.archetype \ -DarchetypeArtifactId=knockout4j-archetype \ -DarchetypeVersion=0.20 \ -Dmoepath=client-ios \ -DartifactId=moetest \ -DgroupId=com.acme.demo \ -Dversion=1.0-SNAPSHOT $ cd moetest $ mvn install
Assuming the Maven build has succeeded,
you are ready to execute your project.
To do that, you have to select proper target device. You can use
moe:listSimulators command of the
client-ios subproject. For example,
if you are interested in iPhone X, use:
$ mvn -f client-ios/pom.xml moe:listSimulators | grep iPhone.X
The ID of your iPhone X simulator gets printed and you can perform the final step. Launch your application in an iOS simulator:
$ mvn -f client-ios/pom.xml moe:launch -Dmoe.launch.simulatorId=_theSelectedID_
Heuréka. Your application is running:
After performing the above steps you may feel like a master of the Maven command line interface! However sometimes it is more convenient to use an IDE. As such the DukeScript archetype for Multi OS Engine also comes with support for XCode:
$ open client-ios/xcode/ios.xcodeproj/
In the XCode interface you can configure the deployment options of your application in the traditional XCode way. You can execute your application in the simulator as well as on the device:
Enjoy the new support for Multi OS Engine. Read more about the standard structure of the archetypes in our introduction tutorial. If some detail isn’t clear yet, don’t hesitate checking our getting started guide. Alternatively consider reading the Java Everywhere book.
Merry Christmas and Happy New Year!