Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 0dfd838

Browse files
authored
Merge pull request #99 from heyman/fix-ios-cleanup
Fix issue causing WebViewExt to not be removed/cleaned up on iOS
2 parents 5b2c7f4 + 65dc0c3 commit 0dfd838

26 files changed

+21939
-14287
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@
5757
"{demo,unittest}/platforms/**/*": true
5858
},
5959
"cSpell.words": [
60+
"APPICON",
61+
"ASSETCATALOG",
6062
"Freiling",
6163
"HTMLX",
64+
"IPHONEOS",
6265
"Morten",
6366
"NSURL",
6467
"Notalib",
@@ -74,6 +77,7 @@
7477
"armeabi",
7578
"bootstrapper",
7679
"devtool",
80+
"dont",
7781
"downlevel",
7882
"endregion",
7983
"filepath",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// You can add custom settings here
22
// for example you can uncomment the following line to force distribution code signing
3-
// CODE_SIGN_IDENTITY = iPhone Distribution
3+
// CODE_SIGN_IDENTITY = iPhone Distribution
44
// To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
55
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
66
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7+
VALIDATE_WORKSPACE = YES;
8+
IPHONEOS_DEPLOYMENT_TARGET = 9.3;

demo/app/main-page.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import * as trace from "@nativescript/core/trace";
2-
import { Button } from "@nativescript/core/ui/button";
3-
import { EventData, Page } from "@nativescript/core/ui/page/page";
4-
import {
5-
EnterFullscreenEventData,
6-
isAndroid,
7-
LoadEventData,
8-
LoadFinishedEventData,
9-
ShouldOverrideUrlLoadEventData,
10-
WebViewExt,
11-
} from "@nota/nativescript-webview-ext";
1+
import { Button, EventData, Page, Trace as trace } from "@nativescript/core";
2+
import { EnterFullscreenEventData, LoadEventData, LoadFinishedEventData, ShouldOverrideUrlLoadEventData, WebViewExt } from "@nota/nativescript-webview-ext";
123
import * as fastEqual from "fast-deep-equal";
134

145
let webview: WebViewExt;
@@ -26,7 +17,7 @@ let gotMessageData: any = null;
2617
export function webviewLoaded(args: LoadEventData) {
2718
webview = args.object;
2819

29-
if (isAndroid) {
20+
if (global.isAndroid) {
3021
webview.src = "http://10.0.2.2:8080";
3122
} else {
3223
webview.src = "http://localhost:8080";

demo/app/package.json

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

demo/nativescript.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NativeScriptConfig } from "@nativescript/core";
2+
3+
export default {
4+
id: "dk.nota.webviewdemo",
5+
appResourcesPath: "app/App_Resources",
6+
android: {
7+
v8Flags: "--expose_gc",
8+
markingMode: "none",
9+
},
10+
appPath: "app",
11+
} as NativeScriptConfig;

demo/nsconfig.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)