Loading app from a server



If Ionic is just HTML and JS, does this mean it should be possible to store your core views and scripts on a remote server? This would allow us to provide quick updates to our app without the entire app store deployment process.

I assume their would be an index.html bundled with the app still that would point to remotely located scripts/views

[Is it possible ? ] Create an ionic app with all it's contents hosted on cloud including index.html?

:thinking: You can download app.bundle.js from your server.

<script src="https://<mydomain>/build/js/app.bundle.js"></script>

instead of:

<script src="build/js/app.bundle.js"></script>
1 Like

As far as i know - Apple does not allow download of code - only data.
They do allow updating - so called hot-code-push, but i think the code have to be located on the device.

1 Like

I’m confused, the Cordova is browser. The browser opens html page and downloads dependencies like javascript code, style and another resources. If Apple don’t allow it, how does browsers work?


I think it technically still works but it probably breaches their T&C’s. The hot code push is useful to know.


You can pull in views or JS code from anywhere. Its the core code that cannot change.


What do you class as core? any native binaries?


Just to add my thoughts…

So you could make all your code remote, and push updates on the fly, what about if the user has no internet connection?

This is why we suggest people to keep all the code on the device. You could look into something like cordova-hot-code-push or ionic-deploy and bypass the app store approval process.

As for what can be an cannot be updated, it’s only the web code (html/css/js/img) that can be updated. With that, these cannot be drastic changes either. They need to be either small bug fixes, or content update. Any drastic changes to the app UI/UX needs to be resubmitted.

Also, any native code (cordova plugins) cannot be updated through these code deploy methods. They need to be recompiled and resubmitted to the app store.

1 Like

Sure, defiantly something to considered. In our scenario though our entire app relies on you having an internet connection. It might still be worth using the hot code push method though in case the user loses connection in the middle of something. You could probably handle 404’s from an api better than 404’s for the scripts and templates.

Does app or Google actively monitor this though? If so what happens? It seems difficult to monitor this when you don’t have any control over the release of code, at least in terms of the HTML/JS/CSS.


As for Apple policy here is valuable resource

I wonder if there exist some reusable workflow/module that could allow to update app codebase and store it on a device. Even if not for Ionic 2 maybe there is something that could be adapted from Ionic 1?


Isn’t UX/UI the css ? So why we can’t update without recompile it ?
What do you mean by “Any drastic changes to the app UI/UX needs to be resubmitted”

1 Like