I am still strugling a bit with redirects on a mobile app. It seems that the cordova-plugin-whitelist plugin has changed it behaviour so now all redirects are forbidden unless an allow-navigation is put in the config.xml of the phonegap.zip package. If you do this it will work again in app you put on your mobile device however it still does not work in de Mendix developer app when you test the app on your local machine. This makes the whole proces of debugging your mobile app impossible when you also have anonymous user roles. In our case in the desktop mode the anonymous users have a role and all works well. In our mobile app we used to redirect an anonymous user to the login.html. We have got this working again and filed a feature request to whitelist automaticly the domain of the app to the config.xml (note also for persons interested in creating mobile apps that currently Icons and splashscreens also need to be adjusted in the config.xml. The specs have changed and I filed a support ticket for this also to get the phonegap.zip changed). But now how to get the Mendix developer app to redirect again, so I can test and develop the mobile app further without going through the hassle of creating an app to put on my phone? I hope somebody from the Mendix team can chime in here about the inner workings of the Mendix developer app. If my assumption is correct that Phonegap is also the basis for this app then the blocking of redirects can be explained and the app should be adapted in my opinion to allow redirects. If anybody has a suggestion how to redirect in the Mendix developer app please share your findings because now it is a real pain in the .... to develop the mobile part. Regards, Ronald [EDIT] I use the GetApplicationURL from the community commons and create the full URL string. So for localhost this would be https://localhost:8080/login.html
Could you explain more about the case?
By default the Hybrid app is a single page app. There are no redirects done (to login.html like in a web app), but the login html elements are in the index.html and a login screen is shown when the user must login.
Btw, it is also possible to create a build of your app via phonegap which connects to you local machine by changing the Mendix url in the index.htm of your hybrid app. Also, Weinre (for debugging) can be enabled via the settings when you build your app on build.phonegap.com
I would recommend another approach where you use a microflow that has anonymous user as role and that MF opens a page with a user role. This will trigger the client to open the standard mobile login screen, so no redirecting is needed because the platform will handle the authentication.
My suggestion, to really test your app with own config: build a test App pointing to your local IP. So in index.html change the Mendix cloud URL to 192.168.1.whatever:8080. Build your app ones, install it and now you can develop locally as long as your machine keeps the same IP address. Your phone has to be on the same WIFI off course.
This works very well for me, with a lot less issues.