Currently, Wappler does not have a way to specify connections to different targets in mobile projects. Typically, development will happen against a non-prod target of the Wappler server project and at a certain point the mobile app will need to be packed for deployment to end users against the prod target.
I would like to see a way to change the target, like we do in Server projects, so when the app is built/packaged, it updates all of the URL references from the non-prod URL to the prod URL.
As an example, all of these URLs need to be switched from dev URL to prod URL.
Hi @George, this is a challenging issue for mobile development. I've started to build workarounds by using variables and dynamic bindings to switch the domain on pages, but I've run into a blocker on App Flows.
There's no way to dynamically bind a Server Connect action in App Flows. It seems my only option is to run a find/replace across my entire project whenever I want to build against a different target.
It would be ideal to have a global target(s) that can be used across all parts of the mobile app, with a default target that works on the web server, and being able to build against different targets.
Also, there's more to it. As a developer, I'll need both a development and production electron/android app on my system each with separate databases (dev sqlite database, prod sqlite database, etc).
I just dynamically change the url of all server connects, forms, etc. I took it one step further and added also a version number of the api so legacy apps in the wild would not break with backend updates.
base_url and api_path are dmx variables that I set during the Cordova build process since it was different for the multiple tenants using the code base.
Just want to be clear, I'm not talking about dynamic bindings on server connect, but instead, using API's connector, because arent server connect just api's ? You can set dynamic urls depending on the environment..
All data stored in server db as local storage was not supported when I built these apps, which I have now deprecated. I elected to go to PWA for a number of reasons.