Is it possible to use LUA or JS to bypass AOT limitations on iOS?

Hi guys!

Just got an idea of using LUA or JS to bypass(partly) AOT limitations on iOS for situations when you stream AssetBundle from server which will include TextAssets with scripts.

I see it in this way:

  1. Create folder for your AssetBundle
  2. Create a GameObject
  3. Attach a special c# script component “LUA_JS_Behaviour.cs” with empty “LUA/JS Script” public property (this component will be compiled with main assembly)
  4. Build AssetBundle
  5. Load AssetBundle and Instantiate loaded GO
  6. Set “LUA/JS Script” public property of GO to loaded TextAsset.text
  7. Call something like ItsAlive();

So does anybody knows a solution for LUA or JS (or any other) interpreter that can be compiled with Game in very beginning and then it should be used as “some kind” GameObjects logic? And could my app be banned for that on App Store? :slight_smile:

Thanx for any liks or materials!

The issue with downloading scripts on iOS isn’t so much a technical issue, it’s that Apple just don’t allow it.

If you check the iOS App Review Guidelines it states:

2.7 Apps that download code in any way or form will be rejected

Even if your application passes review, it can still get pulled when it’s live, which is even worse. The more successful your application, the more possible it is to get scrutinised, so you may end up with a scenario of your application getting banned at the worst possible time.