Skip to content

Commit e675b0e

Browse files
committed
fix: add app.js
1 parent e8a6a9a commit e675b0e

File tree

2 files changed

+33
-42
lines changed

2 files changed

+33
-42
lines changed

app/app.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
const application = require("tns-core-modules/application");
4+
const platformModule = require("tns-core-modules/platform");
5+
const applicationSettingsModule = require("tns-core-modules/application-settings");
6+
const deepLinkDataModule = require("./shared/deep-link-data");
7+
if (platformModule.isIOS) {
8+
const mydelegate = require("./delegate/my-delegate");
9+
application.ios.delegate = mydelegate.MyDelegate;
10+
}
11+
function launchExample() {
12+
const rootView = application.getRootView();
13+
if (applicationSettingsModule.hasKey("gotoexample")) {
14+
const value = applicationSettingsModule.getString("gotoexample");
15+
if (value !== "") {
16+
applicationSettingsModule.remove("gotoexample");
17+
rootView.navigate({
18+
moduleName: value,
19+
clearHistory: true
20+
});
21+
}
22+
}
23+
}
24+
application.on(application.resumeEvent, function (args) {
25+
if (args.android) {
26+
const dld = new deepLinkDataModule.DeepLinkData("", args.android);
27+
launchExample();
28+
}
29+
else if (args.ios) {
30+
launchExample();
31+
}
32+
});
33+
application.run({ moduleName: "app-root" });

app/app.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)