Running an Application

To run the app through the CrossMobile Managerial Application, select one of the four targets :
Desktop:

iOS:

Android:

Unified Windows Platform (Experimental):

And Click Run

There are two ways open a Crossmobile Project with NetBeans.

  1. Open Netbeans from Crossmobile Application.

  2. Import Crossmobile Project directly to Netbeans

1. Open Intellij from Crossmobile Application.

To open a Crossmbile Project to NetBeans from the CrossMobile Application:

Click “Open” and then Select “in NetBeans”

If Crossmobile Apllication is not configured to use Netbeans this option will be grayed out. To configure see Initial Configuration.

2. Import Crossmobile Project directly to Netbeans

To open a Crossmobile project directly from Netbeans :

Click Open Project.

Navigate to the Projects root directory, select the project folder, and Click Open.

3. Run crossmobile Project from Netbeans

To run Crossmobile App for Destop expand the Configurations Drop down select desktop.

And press the Run Button.

To run for the other target you have to create a configuration first. To do that, expand Configurations Drop down and select Customize.

Press Add..

Add a Cofiguration Id and Activate the profiles you want (i.e. to run android : android,run)

deskop :
builds a pure java app that runs on any desktop
environment

ios :
constructs a native ios project that opens with
xcode and builds for ios devices

android :
constructs a native android project that can open
form android studio and builds for android

uwp (Experimental) :
constructs a native ios project and uses Microsoft’s
WinObjC to create a Unified Windows Platform
project that builds for Windows

run :
This is a special Profile that runs the application after it’s built.



Press OK to return to your project

Select the Created Cofiguration and press Build

There are two ways open a Crossmobile Project with IntelliJ IDEA.

  1. Open Intellij from Crossmobile Application.

  2. Import Crossmobile Project directly to IntelliJ IDEA

1. Open Intellij from Crossmobile Application.

To open a Crossmbile Project to IntelliJ IDEA from the CrossMobile Application:

Click “Open” and then Select “in IntelliJ IDEA”

If Crossmobile Apllication is not configured to use IntelliJ IDEA this option will be grayed out. To configure see Initial Configuration.

2. Import Crossmobile Project directly to IntelliJ IDEA

To open a Crossmobile project directly from IntelliJ IDEA :

Click Open.

Navigate to the Projects root directory, select the project folder, and Click Open.

3. Run crossmobile Project from IntelliJ IDEA

Both ways open the Project in IntelliJ IDEA

Crossmobile projects are Maven projects. You can build them as you would any Maven project with the exception that you must define the target platform as the target Profile.

Procceed to open the Maven Project tools

If Maven Project tools are not visible, click View -> Tool Windows -> Maven Projects

Expand Profiles to see available Profiles

Crossmobile supports six maven profiles. Four for target platform :

deskop :
builds a pure java app that runs on any desktop
environment

ios :
constructs a native ios project that opens with
xcode and builds for ios devices

android :
constructs a native android project that can open
form android studio and builds for android

uwp (Experimental) :
constructs a native ios project and uses Microsoft’s
WinObjC to create a Unified Windows Platform
project that builds for Windows

One that runs the application run :
This is a special Profile that runs the application after it’s built.


To run the application you jaust need to tick one of the target profiles and the run profile and double click install

There are two ways open a Crossmobile Project with IntelliJ IDEA.

  1. Open Android studio from Crossmobile Application.

  2. Import Crossmobile Project directly to Android studio

1. Open Android studio from Crossmobile Application.

To open a Crossmbile Project to Android studio from the CrossMobile Application:

Click “Open” and then Select “in Android studio”

If Crossmobile Apllication is not configured to use Android studio this option will be grayed out. To configure see Initial Configuration.

2. Import Crossmobile Project directly to Android studio

To open a Crossmobile project directly from Android studio :

Click “Open an existing Android Studio project”.

Navigate to the Projects root directory, select the project folder, and Click Open.

3. Run crossmobile Project from Android Studio

Once the project is Open in Android studio press Run

There are three ways open a Crossmobile Project with Xcode.

  1. Open xcode from Crossmobile Application.

  2. Open xcode project file directly

  3. Run crossmobile Project for ios

For crossmobile to be able to build for ios or open xcode, it needs to run on a MAC with Xcode installed.

Open xcode from Crossmobile Application.

To open a Crossmbile Project to Xcode from the CrossMobile Application:

Click “Open” and then Select “in Xcode”

Open xcode project file directly.

To be able to open the project directly in Xcode, it needs to be built as iOS first;

Once Built you can either open Xcode click “Open another project…”, navigate to the projects root directory and click “Open”.

or navigate to the projects root directory and double click the .xcodeproj file.

Run crossmobile Project for ios.
Run the project from Crossmobile Application as iOS or
from any IDE or terminal with profiles ios and run activated

Once the Project is Open in Xcode press Run

You can also use the console to run the application. Crossmobile projects are Maven projects. You can build them as you would any Maven project with the exception that you must define the target platform as the target Profile.

Crossmobile Supports 4 platform Profiles :

Desktop:

mvn install -Pdesktop

iOS:

mvn install -Pios

Android:

mvn install -Pandroid

Unified Windows Platform (Experimental):

mvn install -Puwp

To run the App from terminal, Crossmobile supports the optional Profile “run”.
For Example to run the application on your Desktop type :

mvn install -Pdesktop,run

and so on.

If you want to use Eclipse as IDE open Eclipse and select your Workspace directory:

When the IDE opens press File -> Import…




Select Existing Maven Projects from the list.

Click Browse, open the root directory of your Crossmobile Project and click Finish.

It will display an error because Crossmobile is not in the Eclipse marketplace.
This Cannot be resolved but the project will run normally.
Click Finish and then OK.




To run the project click on the small down button besde the Run button.
adn select Run Configurations

Give the Configuration a name (for Example : Run Desktop)

  1. for Base directory click Variables.. and select project_loc

  2. for Goals specify install

  3. and for Profile the desired Profiles

Crossmobile supports six maven profiles. Four for target platform

deskop :
builds a pure java app that runs on any desktop
environment

ios :
constructs a native ios project that opens with
xcode and builds for ios devices

android :
constructs a native android project that can open
form android studio and builds for android

uwp (Experimental) :
constructs a native ios project and uses Microsoft’s
WinObjC to create a Unified Windows Platform
project that builds for Windows

One that runs the application

run :
This is a special Profile that runs the application after it’s built.

and click Run.