Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by artfabrique · Aug 02, 2013 at 11:39 PM · iosruntimeaot

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? :)

Thanx for any liks or materials!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image $$anonymous$$ · Feb 03, 2015 at 06:26 PM 0
Share

Hi, did you end up using this technique.

I'm trying to find a way to update the contents of my app without updating to iTunes app store all the time. I'm was planing to do this using Asset bundles. But I can't have executable code in asset bundles. And putting executable code inside DLL's won't work because Assembly.Load does not work on iOS (due to AOT nature of the system). So this might be a great fix.

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by mviuk · Aug 03, 2013 at 09:56 AM

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:

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image artfabrique · Aug 03, 2013 at 10:47 AM 0
Share

Yes, @mviuk , after some investigation of couple games (Order&Chaos and Clash of Clans) i came up to conclusion that they pulling something like C$$anonymous$$L or JSON for content&game-design updates i guess. Can't vote up - not enough karma (

avatar image $$anonymous$$ · Feb 03, 2015 at 06:19 PM 0
Share

Hi guys, do we know for a fact that this happens. Getting rejected if we download lua scripts. I know that apple specifies "Apps that download code in any way or form will be rejected" but lua scripts are just that, scripts, nothing more. It's not like a C# script that gets compiled. It's interpreted. Just wanted to know if some one has tried this, before I commit to this kind of an approach.

avatar image mviuk · Feb 03, 2015 at 06:47 PM 0
Share

Apple's not interested in how the code is represented (compiled or interpreted). The reason for the restriction is to make sure all functionality (and updates to functionality) goes through Apple's review process. If they didn't have this restriction they wouldn't be able to stop people creating things like application portals (their own app stores within the app store) and emulators.

It's much better to go the data route as artfabrique said, represent key parts of the game through JSON or asset bundles, this is actually a very flexible approach. From a quick google it looks like Apple have rejected applications in the past for downloading code (I'm assu$$anonymous$$g they have some automated tools for detecting this), so while you might get lucky and sneak it past them, there's obviously some risk involved.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AOT Runtime Problem: Variable of type IMyInterface changes type to String(impossible..??) 0 Answers

PtrToStructure with array fields on iOS (ie AOT only mode) 0 Answers

Loading scripts dynamically in AoT compilers 1 Answer

Add lightmap at runtime has problem on iOS 0 Answers

My Generic function using LINQ(orderBy thenBy)Not working on IOS 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges