Changes on the fly - Getting resources (js, templates, css) from external CDN

First time Ionic.
Creating an prototype app, I need to be able to make changes to the app without the need to upload a new version to app stores.

So I thought it would be great if my app gets my resources from my CDN, which seems to be possible using the whilelist-plugin. So then I can make changes to the source files, upload to CDN and make sure that the users always have a up-to-date version

Would it be good practice to fetch all templates and javascript files from the CDN? Is it possible?

Take a look at contentsync plugin, https://github.com/phonegap/phonegap-plugin-contentsync.

Raymond Camden created a blog post at http://www.raymondcamden.com/2015/05/19/working-with-the-new-phonegapcordova-contentsync-plugin

While I can see why you would want this functionality, Apple will reject your app from the App Store if you try and download code from an external source:

https://developer.apple.com/app-store/review/guidelines/#functionality

If they allowed you to change the code on the fly like that, you could basically get one app approved, then change the entire thing once you are in the app store. Bad idea.

I’m not sure if Google has the same policy, but if you want your app in the App Store, you can’t do this.

Ok thanks!
What’s the usage of having webviews then? Seems kinda weird

Hi,

Just to mention that I’ve had apps built with Meteor accepted onto the Apple App Store. Meteor supports Hot Code Push which allows you to change your code on the fly - similar to the contentsync plugin that @tomkuipers recommended.

You aren’t allowed to substantially change the functionality of the app (e.g. a RSS reader to a video player) but you can update your code this way. There’s an article on Meteor.com that talks about apple approving it: http://info.meteor.com/blog/apple-hot-code-push-mobile

Nice! I didn’t know they had a special clause for this use case, I just read through the guidelines and a few articles and it sounded like you couldn’t download/update any files, such as HTML and JS files. But this is really good to know and I appreciate the heads up!

Cheers!