Does this help? https://docs.mendix.com/howto6/building-a-mendix-hybrid-mobile-app-for-windows-phone
2.5 describes URL redirect for your Index.html
Mendix has a template for creating phonegap wrappers here. But you can download a preconfigured setup of this template by going to sprintr > your app > Deploy / Mobile App > publish for mobile app stores and select the option to do it yourself. This will download a phonegap wrapper which already correctly points to the selected environment.
See Lennards comment. That is the recommended approach.
on the page where you can download your app there is also a link to https://github.com/mendix/hybrid-app-template/ which describes more.
Also note, that you can use just Cordova.
Hi Miguel,
Check out our video tutorial on this subject:
https://www.youtube.com/watch?v=7ic625u2YJE
Instead of selecting the 'build in the cloud' option, select 'do it yourself' if you want to change the Phonegap package yourself (additional plugins, etc).
because i am not working in a licenced cloud node, there no way to get the preconfigured setup. i have got the hybrid-app-template but i am having aproblem with this line 'var mxapp = require("mendix-hybrid-app-base"); ' in the entry.js file. the cordova app is blocking on that. so how to get and initialize the mx client in the javascript?
Hi, thanks,
I could build it from scratch. now when i run the app on a mobile device i keep getting the error log as below. do any one have any clue?
The key "viewport-fit" is not recognized and ignored.
entry.js:43 Received Event: deviceready
index.html:3 Uncaught SyntaxError: Unexpected token {
es6.promise.js:97 Unhandled promise rejection Error: Failed to setup directory locations: unsupported platformmessage: "Failed to setup directory locations: unsupported platform"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: des6.promise.js:97 (anonymous function)
Solution for me was to include the following line in config.xml:
<plugin name="cordova-plugin-file" source="npm" spec="4.2.0" />