Building Mendix Hybrid Apps with Cordova’s CLI

Mar 4 · 6 min read

With the age of Mendix using Phonegap soon coming to an end, there are still a lot of running applications which will need to be maintained. Meaning we will still need make use hybrid mobile applications, at least for a little while longer. Therefore, I am writing this blog to explain step by step, how to build an APK or IPA file.

How to build Hybrid Android APK’s using Cordova’s Command Line Interface.

Fig. 1. Your home apps
Fig. 2. Permission in mobile application
Fig. 3. Press Publish to build mobile.
Fig. 4. Download package
Fig. 5. Package extraction
Fig. 6. Open phonegap package with vscode.
npm install
Fig. 7. Initiate npm lib in the phonegap project.
Fig. 8. Environment variable configuration.
Fig. 9. Parameter variable configuration.
Fig. 10. Add on cordova plugin in config.xml.mustache
Fig. 11. Custom JS in index.html.mustache.
npm run package
Fig. 12. Initiate build package for hybrid app.
Fig. 13. Plugin appears on build packages
Fig. 14. JS custom appear on build package.
cd build
Fig. 15. Go to build folder.
cordova platform add android
Fig. 16. Add android module via cordova cli.
cordova plugin add cordova-plugin-customurlscheme — variable URL_SCHEME=app2
Fig. 17. Add cordova plugin into the project.
cordova build android
Fig. 18. Build android apk file with cordova cli
Fig. 19. apk file release

How to build hybrid iOS with the Cordova Command Line Interface

Fig. 20. At mendix apps website get ios package.
cordova platform add ios
Fig. 21. Add ios module
Fig. 22. Add cordova plugin
cd platform/ios 
pod install
Fig. 23. Go to ios folder
Fig. 24. pod install
Fig. 25. open ios folder with xcode.
Fig. 26. Select team and signing certificate
Fig. 27. Select device to build and install application.
error: The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation.
Fig. 28. Add custom path in build setting.
Fig. 29. Change the path name in buil phase.
Fig. 30. Build success.
Fig. 31. App is on iphone now
Fig. 32. Open App

Read more:

Mendix Community

The community-sourced publication for low-code

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store