What is the iOS Runtime and how does it operate?
Why do we need to change it?
Which approach did we choose?
We chose to go with V8 for both platforms for several reasons:
- V8 is embedding friendly and now it supports JIT-less mode which makes it possible to be used on iOS.
- This allows us to provide Bitcode support down the road, which is a blocker for other exciting features like writing Apple Watch applications in NativeScript.
Several months ago, Darin Dimitrov from the runtimes team started a POC to verify how feasible this would be, and step by step he came to the point where this option became very realistic. As the main driver of this effort, Darin went through extensive collaboration with Google's V8 team who were extremely helpful in this process. Now is the time to say big thanks to Jakob Gruber for all the help along the way.
At this point a big part of our tests are passing with the new runtime and we managed to get some internal applications working with it as well. The performance is similar to the official version, even without providing support for snapshots. With that said, we are extremely excited to share those bits with you as well.
Give it a try!
Testing the new iOS Runtime is really easy. You need a working NativeScript application - you can try it on a brand new blank project or on some of your existing apps (be sure to have a backup!). The only command you need to run is:
tns platform add ios@alpha-v8
After that, just run the application the usual way:
tns run ios
And you are all set!
The following features are not implemented, yet and will not work correctly:
- Vector types
- Safari Inspector and Chrome DevTools are not supported
- No armv7 architecture
- No logging
- Lack of error handling
- HMR will work only with real devices
- interop.Reference API might not work for more complicated types
First, if you gave it a try - be sure to let us know what do you think! If you find any issues, please report them in the V8 iOS repository and don't forget to mention that you are using the V8 alpha. Since logging is still not enabled, you will need to attach a sample repro of the problem so that we can debug it.
We are looking to release a BETA and more stable version by the end of the year. Your feedback will be essential for addressing the most important issues on time and scope the release accordingly.