-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.ts
35 lines (29 loc) · 954 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import '@nativescript/capacitor/bridge';
import * as Plugins from '@nativescript-community/capacitor-plugins';
native = Object.assign(native, Plugins);
/**
* **** ****
* ****** ****
* ******** ****
* ****** ***** ****** NativeScript
* **** ********
* **** ******
* **** ****
*
* 🧠 Learn more: 👉 https://capacitor.nativescript.org/getting-started.html
*/
// Example A: direct native calls
const hello = `👋 🎉 ~ NativeScript Team`;
if (native.isAndroid) {
console.log(new java.lang.String(`Hello Android ${hello}`));
} else {
console.log(NSString.alloc().initWithString(`Hello iOS ${hello}`));
}
/**
* In addition to calling platform iOS and Android api's directly,
* you can write your own additional helpers here.
*/
// Example B: simpler helper returning a value
import './examples/simple';
// Example C: opening a native modal
import './examples/modal';