()
| 27 | } |
| 28 | |
| 29 | function isEmbedded(): boolean { |
| 30 | if (__APPLE__) { |
| 31 | return !!NativeScriptEmbedder.sharedInstance().delegate; |
| 32 | } else { |
| 33 | // @ts-ignore |
| 34 | // Check if the Bootstrap class exists and has the isEmbeddedNativeScript property |
| 35 | // This is a way to determine if the app is embedded in a host project. |
| 36 | return org.nativescript?.Bootstrap?.isEmbeddedNativeScript; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Get the current application instance. |