As your Mendix app matures, you may want to expand its functionality (such as by introducing custom widgets or logic that will require new native dependencies). One such customization could be adding a near-field communication (NFC) module to your app. While the Make It Native app suffices for testing basic apps, as your app adds custom dependencies—like custom native widgets or fonts—you will need a more tailored developer app.
A custom developer app helps you by serving as a replacement for the Make It Native app, and should be used when you have custom widgets and logic which are not supported by the Make It Native app. Custom developer apps are apps you can generate yourself using your current app structure, your custom modules, and any other requirements to test your evolving app. Custom developer apps feature the same functionality as the Make It Native app but are tailored to your needs.
- Complete How to Get Started with Native Mobile
- Complete the Mendix Native Mobile Builder wizard as found in Deploy Your First Mendix Native Mobile App
3 Build Your Developer App
Run Mendix Native Mobile Builder from your app:
When Mendix Native Mobile launches you are greeted with the home screen:
Choose Build app for local development
Given you already went through the initial wizard at least once, you should be greeted with the configuration screen for Building an app for local development:
Click the Build developer app button
The tool will set up your GitHub repository commit your changes, configure App Center if needed with two new apps, one for iOS and one for Android and continue with building the apps.
When the build completes, you can scan the QR code provided to install the app to your device. Currently the QR code service is only supported for Android devices.
4 Installing Your Custom Developer App manually
For Android the output of the build is an APK file. APK files can be directly installed on devices or emulators.
4.1.1 Installing on an Emulator
With your emulator running, install your app in your emulator by doing the following:
- Drag and drop the APK onto the emulator’s window.
- Wait for the installation to be done.
- Open the app from the launcher.
4.1.2 Installing on a Device
There are various ways install an app on a device. Installing using a USB is detailed below, but you can use a different method if it suits you. Do the following to install your APK onto a device:
- Connect your device to your machine via USB.
- Enable file transfer on your device (differs per device).
- Open This PC in File Explorer; your device should be listed as an external device.
- Drag and drop your APK onto your device.
- Wait for it to finish transfering.
- Open your device’s file manager.
- Navigate to the root of the file system.
- Tap the APK to install.
- Go through the installation steps.
- Open the app from the launcher.
By default your custom developer app will be unsigned. To get a signed IPA, follow the steps in the Signing Your Build section of How to Deploy Your First Mendix Native Mobile App. Your custom developer app branch is named developer.
The unsigned output of an iOS build is an XCArchive file. XCArchive files require manual signing before they are ready to be installed on a device.
The signed output of iOS build is an IPA file. If correctly signed, IPA files can be installed on physical devices.
4.2.1 Installing on an Emulator
Before installing, make sure you have completed the following prerequisites:
- Have a Mac OSX machine
- Install LTS builds of NodeJs and NPM (download here)
- Install Cocoapods (installation instructions)
- Install the latest XCode version
Builds with the Mendix Native Mobile Builder are stripped of simulator artifacts. Therefore, to run on XCode’s Simulator you will have to build the developer branch locally from source by completing these steps:
- Navigate to your GitHub repo.
Switch to your developer branch:
Click Clone or Download and then click Download ZIP:
Unzip the downloaded archive.
Open a terminal and change directory into the folder.
Run this command:
npm i && cd ios && pod install
This will install the node module dependencies and the iOS Dependencies
In the ios folder, open the NativeTemplate.xcworkspace file:
In XCode select the Dev target and the emulator you want to build your developer app for:
4.2.2 Distributing the Custom Developer App to the Apple App Store
To run your custom developer app on a device which is not registered as a test device on the Apple Developer Portal, you will have to sign the developer app with your certificates manually and distibrute it via TestFlight.
Read more on TestFlight in the official documentation.