MobileUI LogoMobileUI

Add MobileUI to a RoboVM iOS app

Learn how to add MobileUI to an existing RoboVM iOS app.

MobileUI on iOS requires RoboVM. RoboVM compiles Java code to machine code and brings Java APIs for all iOS SDKs. MobileUI uses these APIs and comes as set of Java libraries. If your project uses RoboVM, you can integrate MobileUI as follows.

Gradle Dependency

MobileUI comes with an installer, that installs the MobileUI libraries into your Maven local repository. To use them within your RoboVM project, make sure that mavenLocal() is set as a repository location as exemplified below:

repositories {

Then add the following dependency to your build.gradle file:

dependencies {
    implementation "io.nevernull:mobileui-ios:<version>"    ...

Note: Replace <version> with 0.5.3

Location of MobileUI Assets

The MobileUI framework for iOS expects MobileUI assets to reside in a resource folder with name assets that comes packaged with the app (IPA file). To achieve this, extend the robovm.xml file in your project with an additional resource location that points to your assets folder. This can be done as shown below:

        <resource>            <targetPath>assets</targetPath>            <directory>../app-common/src/main/assets</directory>            <skipPngCrush>true</skipPngCrush>        </resource>        ...

The previous listing shows the default setting for assets, when you generate your MobileUI project with the MobileUI Plugin.

Apply MobileUI in your iOS app

To use MobileUI Layouts in your app, please follow the Applying Layouts guide.