开发者

Is Google's V8 JavaScript engine available for iOS?

Can I use V8 on iOS? If not, which embeddable Java开发者_如何学运维Script engine do you recommend?

EDIT:

We don't plan on using it in conjunction with HTML rendering, just for internal scripting.


Apple requires that you use WebKit when rendering web-content in an app, and they may reject your app if you use something else.

That said, you may want JavaScript for something other than rendering a webpage, and in theory that use-case should allow you to use whatever JavaScript engine you want. As the V8 source-code is available in C++, it should be possible to compile it into an iOS project. To do so you'll need to rename any .m files that make use of V8 functionality (either directly or indirectly through transitive dependencies) to .mm so that XCode knows to compile those files as Objective-C++.

This process of getting it to work will likely be a bit finicky, but in theory it should be possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜