Auto Update Mobile Application

Hi All -

Is it possible to build a Unity app for iOS and Android that contains an auto update functionality? We’d like to auto update the app file on user’s handsets at runtime with a new app file from the web. If this is possible, what is the best way to do this? WWW.class javascript?

Many thanks.

1 Like

Stupid question, but isn’t that against Apples rules or EULA or whatever it is called? that way you could get stuff on the phone w/o anyone (apple/android) approving it.

No you can not update code at runtime.
Code updates must go through apples submission process, always!

Its a different story if you add scripting on top of it as that does not contain code (it uses the code in the application). Then you could update that through the web through just download said text files but you will have to implement the whole stuff yourself and the scripting obviously is not allowed to call native stuff etc in any form, only functionality you explicitely expose
Thats how MMOs do it that pretend to update code.

That being said, normally you don’t need to udpate the code, all you need to do is update settings on prefabs etc that then yield a different behavior, or have prefabs using different components than before.
That part can be done through asset bundles in iOS Pro

There is no such thing as WWW.class nor can unity code even be loaded from outside in any form (not even asset bundles). All code is part of the build or non existant

Hey Dreamora, does it mean I won’t be allowed to communicate to my php server - to fetch user’s purchases? Or I should be good?

Generally you are allowed to communicate with a server.
If you are planning on updating parameters on the fly you could also have a look at googles firebase, which - from what ive read - does support that and offer a Unity-Package.

1 Like