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

iOS #34

Closed
Bardiamist opened this issue Jul 13, 2019 · 16 comments
Closed

iOS #34

Bardiamist opened this issue Jul 13, 2019 · 16 comments

Comments

@Bardiamist
Copy link

What about iOS? Why only for Android?

@burhanyilmaz
Copy link

burhanyilmaz commented Jul 14, 2019

Apple forced to use V8 js engine. Hermes is a custom js engine.

@zhigang1992
Copy link

zhigang1992 commented Jul 16, 2019

section 2.17 of Apple’s App Store Review Guidelines state that “apps that browse the web must use the iOS WebKit framework and WebKit Javascript.”

But we are not apps that browse the web right?

And if we are precompiling to bytecode? How is it different from frameworks like flutter?

@Bardiamist Bardiamist reopened this Jul 16, 2019
@alastaircoote
Copy link

The important section is this one:

3.3.2 — An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s).

Apple requires that if you want to download and intepret JavaScript at runtime, you use JavaScriptCore. The key part here is runtime - Flutter does not let you dynamically execute code at runtime, only compile it as part of your released app. With Hermes you could (in theory?) download bytecode remotely and execute it at runtime, which is what Apple forbids.

@tailang
Copy link

tailang commented Aug 9, 2019

Apple forced to use V8 js engine. Hermes is a custom js engine.

Apple forced to use JavaScriptCore,not V8

@vovkasm
Copy link

vovkasm commented Sep 8, 2019

Currently quotation from @alastaircoote is incorrect. Current statement is:

3.3.2 Except as set forth in the next paragraph, an Application may not download or install
executable code. Interpreted code may only be used in an Application if all scripts, code and
interpreters are packaged in the Application and not downloaded. The only exceptions to the
foregoing are scripts and code downloaded and run by Apple's built-in WebKit framework or
JavascriptCore, provided that such scripts and code do not change the primary purpose of the
Application by providing features or functionality that are inconsistent with the intended and
advertised purpose of the Application as submitted to the App Store.

Source: https://developer.apple.com/programs/information/Apple_Developer_Program_Information_8_12_15.pdf

So currently Apple don't force apps to use JSC, it only requires all executed code to be packed in app bundle. And only if you need to download code (technically speaking execute code without any review from Apple), only in this case code can be only executed with system JSC.

@cayomey
Copy link

cayomey commented Sep 8, 2019

I found the quotation from @vovkasm is still a little outdated (dated back to 8/12/2015).

The latest statement from Apple Developer Program License Agreement on https://developer.apple.com/terms is:

3.3.2 Except as set forth in the next paragraph, an Application may not download or install
executable code. Interpreted code may be downloaded to an Application but only so long as
such code: (a) does not change the primary purpose of the Application by providing features or
functionality that are inconsistent with the intended and advertised purpose of the Application as
submitted to the App Store, (b) does not create a store or storefront for other code or
applications, and (c) does not bypass signing, sandbox, or other security features of the OS.

An Application that is a programming environment intended for use in learning how to program
may download and run executable code so long as the following requirements are met: (i) no
more than 80 percent of the Application’s viewing area or screen may be taken over with
executable code, except as otherwise permitted in the Documentation, (ii) the Application must
present a reasonably conspicuous indicator to the user within the Application to indicate that the
user is in a programming environment, (iii) the Application must not create a store or storefront for
other code or applications, and (iv) the source code provided by the Application must be
completely viewable and editable by the user (e.g., no pre-compiled libraries or frameworks may
be included with the code downloaded).

which not even mentioned JavaScriptCore at all.

@vovkasm
Copy link

vovkasm commented Sep 8, 2019

Oh, sorry! Of course @cayomey are right. Latest term is at auth only page as he mentioned. And probably it even allows to download "interpreted code" (still needs to be proved by real published apps, imho).

@BogdanArdelean
Copy link

BogdanArdelean commented Sep 15, 2019

I think that Facebook is already using Hermes on iOS for a while now. There is a hbcbundle instead of a jsbundle in the Facebook app bundle.
See it for yourselves:
https://imgur.com/OQ2duk0
@cayomey is right and my finding (maybe) proves it. I’m very interested to know why is not available on iOS.

@tklajnscek
Copy link

Is there any news on this? If nothing else we'd like to use Hermes on iOS for it's ability to remote debug sync react native code.

@zhigang1992
Copy link

V8 is now on iOS

Kudo/react-native-v8#31

@uday5162
Copy link

uday5162 commented Apr 6, 2020

@zhigang1992 does hermes works on ios now?

@uday5162
Copy link

uday5162 commented May 20, 2020

any update? or
Any guidelines to improve app launch time?

@Eyesonly88
Copy link

Eyesonly88 commented May 28, 2020

Can we disable the ability to execute code dynamically at runtime so we can use it on iOS?
I get that over the air updates is a big feature in RN which is what this dynamic execution helps with I assume. However, not all RN apps need this feature so maybe if we can have the option to disable it then Apple would be okay?

@tohami
Copy link

tohami commented Jul 20, 2020

@zhigang1992 does hermes works on ios now?

@appcoders
Copy link

@tohami Looks like see Pull Request 332

@denissb
Copy link

denissb commented Oct 20, 2021

I guess this one should be closed now as hermes is supported in iOS officially since 0.64.0: https://github.com/facebook/react-native/releases/tag/v0.64.0

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