Skip to content

Commit 6b817d7

Browse files
committed
chore: boot setup
1 parent 400c57d commit 6b817d7

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

apps/demo/src/app.ts

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,13 @@ import { Application } from '@nativescript/core';
66
// uncomment to test Ionic Portals
77
import { IonicPortalManager } from '@nativescript/ionic-portals';
88

9-
const portalApiKey = `eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyMTQ2MzUxIn0.GphiIljo40HYGWDUCWinbPGabcuFmZpujhlf2V8BQf9c0w0FFCOlTZffIUQGIaYLOLMR6BSu95SBpMXTtBSwJ-0Vlf56-SxIfNscR-017eKg2nK8jKxM3L65pN_k3GpoScIg867_gDo-f6IF-UGJcq2ZDCIUFdIx667Dixe82GtCs0g8b3NCXhpx7sXqRaJm8w3W1t1k53VBLRDyVyJhVk7qYXAqzQ6X0TQP0EcWzeR9Ivi3x-6p9n3e-APFVjuAGVEhmJdoTkTCTwIB1FG_Qn_kCMu4KGjL8drdszXeNNJ7IYpOs8QxrOUGcERsap4VASdHQjJSIPLSUjaaNYM0FA`;
10-
11-
const setupIonicPortals = () => {
9+
Application.on(Application.launchEvent, () => {
1210
// Register IonicPortals
13-
IonicPortalManager.register(portalApiKey);
11+
IonicPortalManager.register('<portal-api-key>');
1412

1513
// Create as many Portals as you need to use in your app
1614
IonicPortalManager.create('ionicWebStart');
1715
IonicPortalManager.create('ionicWebModal');
18-
};
19-
20-
if (global.isIOS) {
21-
@NativeClass()
22-
class CustomAppDelegate extends NSObject implements UIApplicationDelegate {
23-
static ObjCProtocols = [UIApplicationDelegate];
24-
25-
applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<string, any>) {
26-
setupIonicPortals();
27-
28-
return true;
29-
}
30-
}
31-
Application.ios.delegate = CustomAppDelegate;
32-
} else {
33-
Application.on(Application.launchEvent, () => {
34-
setupIonicPortals();
35-
});
36-
}
16+
});
3717

3818
Application.run({ moduleName: 'app-root' });

0 commit comments

Comments
 (0)