Hacker News new | ask | show | jobs
by Svenstaro 4120 days ago
Or Cordova/Ionic/PhoneGap?
1 comments

Those are rendered with a webview. Nativescript is rendered with native components.
How do "native" hybrid apps such as, react native, titanium, etc. access the native components of the phone?

I have been developing a side project using ionic and have had a fairly positive experience so far, but from what I understand ionic/phonegap apps are just wrapped web browsers is that right?

It's pretty much identical at a high level: there is a proxy layer that is much like a message passing system. A component (web view, JS engine, etc.) says, "Take a photo with the camera" and the proxy layer calls the native code needed to take the photo with the camera.

The actual camera data is just abstract data, it doesn't care if it was generated from a JS call or from a native call.

PhoneGap and Cordova are, at the core, just a standard proxy layer and plugin API. The other "pure JS" solutions have their own custom layers.

That's pretty cool, thanks for the insight!