Tuesday, July 31, 2012

Tutorial: Enabling Nitro Javascript in your iOS app directly from Xcode


Apple doesn't allow 3rd party developers to use the super fast Nitro Javascript engine. Only apple's own apps like Safari and iBooks use the engine.


Ever wondered if you could use it? Well its actually pretty easy, you basically have to follow two easy steps:


1. In your Xcode project setting select the application target. In the summary scroll down until you see the 'Entitlements' section. Then enable the entitlements, thats pretty much it for step 1.






2. In your project navigator you will see a new file AppName.entitlements . Open that file and expand the 'Xcode Entitlements' dictionary. Add a row by right clicking anywhere in the document and pressing 'Add row'. 


Next type 'dynamic-codesigning' into the newly added row. Set the type to Boolean, then set the value to YES. 


The 'dynamic-codesigning' will enable the nitro javascript engine for your app, my results with the sunspider javascript speed test show that the Nitro Javascript engine increases the Javascript loading times by ~400%, thats quite a lot! I haven't tested yet if apple will allow this in the app store, but im pretty sure the wont. Let me know if you tried it!


Speed test comparison:








This is the sunspider speed test which showed me the 400% speed increase with the Nitro engine: http://www.webkit.org/perf/sunspider-0.9.1/sunspider-0.9.1/driver.html

Friday, July 13, 2012

ProTube - I didn't forget about it!

The ProTube update I was talking about in the last post will be released within the next month. Sorry for the delay!