Files
Teodor Dermendjiev 05c2460fc4 feat: Pass NS app to the native app instead of presenting it over the root VC (#5967)
* feat: Pass NS app native controller to the native app instead of presenting it over the rootViewController

When NativeScript embedded app is created from the native one we check for whether the topmost UIViewController has NativeScriptEmbedder protocol (implemented in the iOS Runtime) method 'presentNativeScriptApp:'. If yes, we call it with the NS app viewcontroller as a parameter so the embedder has control over the NS app (where and how to present it etc.) For backwards compatibility we present the NS app on top of the topmost UIViewController as a fallback.

* style: Fix lint errors

* feat: Check for protocol instead of selector in embedding

I

* Check for rootController instead of topViewController to prevent crash if !rootController

* feat: Introduce NativeScriptEmbedder singleton

NativeScriptEmbedder is responsive for communication between the NS and the native iOS app. His delegate will implement methods which we can call from javascript such as "presentNativeScriptApp:".
2018-06-27 16:48:11 +03:00
..

Platform specific native code