Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify dynamic plugin support on iOS #23

Open
mosra opened this issue May 22, 2016 · 2 comments
Open

Clarify dynamic plugin support on iOS #23

mosra opened this issue May 22, 2016 · 2 comments

Comments

@mosra
Copy link
Owner

mosra commented May 22, 2016

Currently the support for dynamic plugins on iOS is untested -- dynamic PluginManager "compiles" with dlsym() and everything, but creating a dynamic plugin causes Xcode to report that given executable type is not supported on iOS. I need to find another way or disable them completely if that is not possible with current design.

Food for thought (from #6, thanks @ytain):

http://opensource.apple.com//source/CF/CF-550/CFBundle.h

It has also additional functions allowing you to load the plugins dynamically like those CFBundleLoadExecutable and CFBundleUnloadExecutable etc.

@al-sabr
Copy link

al-sabr commented Mar 28, 2019

On iOS you cannot load any library at runtime because the terms of use specify that all code should be compiled ahead of time. When I published a game on iOS all the dynamic SWF loading in Adobe Air was not working. I had to compile all bundles ahead of time and link them statically to the core app so that I can use them.

This is the documentation I'm talking about: http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

Here there is a thread about your problem : https://forum.starling-framework.org/d/17824-reload-swf-file-on-ios-devices/8

Apple is a shitty company

@mosra
Copy link
Owner Author

mosra commented Mar 28, 2019

"All code should be compiled ahead of time" doesn't imply "cannot load any library at runtime". Since they lifted the restriction on dynamic libraries in iOS 8 (AFAIK in order to make Swift possible), the problem is only with:

  • language VMs, you can't use your own VM for JavaScript, for example, you need to use the one from Apple (which covers your case of dynamic AS3 execution)
  • downloading dynamic libraries from the internet and running them

Both of these restrictions are solely just to make the code auditable when doing AppStore submit and to me they are totally reasonable. You can't audit an app for malicious behavior if it's just a thin shim that downloads all code after or decodes it from some encrypted file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants