From f6f7b514d9d78e265681e21c68ea1e179a66baab Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Mon, 15 Apr 2019 17:32:16 +0300 Subject: [PATCH 1/4] fix(ios): application.displayedEvent does not depend on trace to fire (#7141) --- tests/app/app/app.ts | 30 ++++++++----------- .../application/application-tests-common.ts | 9 ++++-- .../application/application.ios.ts | 4 +-- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/tests/app/app/app.ts b/tests/app/app/app.ts index a0e348269..2460c988a 100644 --- a/tests/app/app/app.ts +++ b/tests/app/app/app.ts @@ -8,24 +8,6 @@ else { import * as application from "tns-core-modules/application"; -// Specify custom UIApplicationDelegate. -/* -class MyDelegate extends UIResponder implements UIApplicationDelegate { - public static ObjCProtocols = [UIApplicationDelegate]; - - applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary): boolean { - console.log("applicationWillFinishLaunchingWithOptions: " + launchOptions) - return true; - } - - applicationDidBecomeActive(application: UIApplication): void { - console.log("applicationDidBecomeActive: " + application) - } -} - -application.ios.delegate = MyDelegate; -*/ - if (application.ios) { // Observe application notifications. application.ios.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, (notification: NSNotification) => { @@ -34,6 +16,18 @@ if (application.ios) { } // Common events for both Android and iOS. +application.on(application.displayedEvent, function (args: application.ApplicationEventData) { + (global).isDisplayedEventFired = true; + + if (args.android) { + // For Android applications, args.android is an android activity class. + console.log("Activity: " + args.android); + } else if (args.ios) { + // For iOS applications, args.ios is UIApplication. + console.log("UIApplication: " + args.ios); + } +}); + application.on(application.launchEvent, function (args: application.ApplicationEventData) { if (args.android) { // For Android applications, args.android is an android.content.Intent class. diff --git a/tests/app/application/application-tests-common.ts b/tests/app/application/application-tests-common.ts index 0e7a76e30..29be43736 100644 --- a/tests/app/application/application-tests-common.ts +++ b/tests/app/application/application-tests-common.ts @@ -13,11 +13,16 @@ if (app.android) { import * as TKUnit from "../TKUnit"; -export var testInitialized = function () { +export function testInitialized() { if (platform.device.os === platform.platformNames.android) { // we have the android defined TKUnit.assert(app.android, "Application module not properly intialized"); } else if (platform.device.os === platform.platformNames.ios) { TKUnit.assert(app.ios, "Application module not properly intialized"); } -} +} + +export function testDisplayedEvent() { + // global.isDisplayedEventFired flag is set in app.ts application.displayedEvent handler + TKUnit.assert((global).isDisplayedEventFired, "application.displayedEvent not fired"); +} diff --git a/tns-core-modules/application/application.ios.ts b/tns-core-modules/application/application.ios.ts index 53941c9ef..c302472d7 100644 --- a/tns-core-modules/application/application.ios.ts +++ b/tns-core-modules/application/application.ios.ts @@ -19,7 +19,7 @@ import { createViewFromEntry } from "../ui/builder"; import { ios as iosView, View } from "../ui/core/view"; import { Frame, NavigationEntry } from "../ui/frame"; import * as utils from "../utils/utils"; -import { profile, level as profilingLevel, Level } from "../profiling"; +import { profile } from "../profiling"; // NOTE: UIResponder with implementation of window - related to https://github.com/NativeScript/ios-runtime/issues/430 // TODO: Refactor the UIResponder to use Typescript extends when this issue is resolved: @@ -131,7 +131,7 @@ class IOSApplication implements IOSApplicationDefinition { @profile private didFinishLaunchingWithOptions(notification: NSNotification) { - if (!displayedOnce && profilingLevel() >= Level.lifecycle) { + if (!displayedOnce) { displayedLinkTarget = CADisplayLinkTarget.new(); displayedLink = CADisplayLink.displayLinkWithTargetSelector(displayedLinkTarget, "onDisplayed"); displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, NSDefaultRunLoopMode); From 4b16363d0bb73ae71e8864246efc00f1a610f414 Mon Sep 17 00:00:00 2001 From: Dimitar Topuzov Date: Thu, 2 May 2019 23:58:58 -0700 Subject: [PATCH 2/4] chore: remove http-server dependency (#7199) `npm i` fails on non windows os because of `http-server` dev dependency. Not sure we need it. --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index f65b9780f..f0f559373 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "grunt-simple-mocha": "0.4.1", "grunt-ts": "6.0.0-beta.11", "grunt-typedoc": "0.2.4", - "http-server": "^0.9.0", "madge": "^2.2.0", "markdown-snippet-injector": "0.2.2", "mocha": "^3.5.0", From c227c5050ac7b05e37830501e1817a36058d3afb Mon Sep 17 00:00:00 2001 From: Alexander Djenkov Date: Fri, 3 May 2019 10:14:31 +0300 Subject: [PATCH 3/4] fix(ios-http-get): http failure during parsing xml (#7175) --- .../http/http-request/http-request.ios.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tns-core-modules/http/http-request/http-request.ios.ts b/tns-core-modules/http/http-request/http-request.ios.ts index 2475fb9c7..e0bca9d0a 100644 --- a/tns-core-modules/http/http-request/http-request.ios.ts +++ b/tns-core-modules/http/http-request/http-request.ios.ts @@ -200,11 +200,21 @@ export function request(options: httpModule.HttpRequestOptions): Promise Date: Fri, 3 May 2019 06:39:13 -0700 Subject: [PATCH 4/4] release: cut the 5.3.2 release (#7200) --- CHANGELOG.md | 12 ++++++++++++ tns-core-modules/package.json | 2 +- tns-platform-declarations/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd7f8cc0..e6a659ae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [5.3.2](https://github.com/NativeScript/NativeScript/compare/5.3.1...5.3.2) (2019-05-03) + + +### Bug Fixes + +* no trace message on empty app.css ([#7135](https://github.com/NativeScript/NativeScript/issues/7135)) ([170d2a8](https://github.com/NativeScript/NativeScript/commit/170d2a8)) +* **ios:** application.displayedEvent does not depend on trace to fire ([#7141](https://github.com/NativeScript/NativeScript/issues/7141)) ([f6f7b51](https://github.com/NativeScript/NativeScript/commit/f6f7b51)) +* **ios:** flat action bar incorrect layout after navigation ([#7077](https://github.com/NativeScript/NativeScript/issues/7077)) ([1dc3952](https://github.com/NativeScript/NativeScript/commit/1dc3952)) +* **ios-http-get:** http failure during parsing xml ([#7175](https://github.com/NativeScript/NativeScript/issues/7175)) ([c227c50](https://github.com/NativeScript/NativeScript/commit/c227c50)) + + + ## [5.3.1](https://github.com/NativeScript/NativeScript/compare/5.3.0...5.3.1) (2019-03-28) diff --git a/tns-core-modules/package.json b/tns-core-modules/package.json index b8e45d1ae..a67fafb53 100644 --- a/tns-core-modules/package.json +++ b/tns-core-modules/package.json @@ -1,7 +1,7 @@ { "name": "tns-core-modules", "description": "Telerik NativeScript Core Modules", - "version": "5.3.1", + "version": "5.3.2", "homepage": "https://www.nativescript.org", "repository": { "type": "git", diff --git a/tns-platform-declarations/package.json b/tns-platform-declarations/package.json index 6d073a7ac..b5ea02141 100644 --- a/tns-platform-declarations/package.json +++ b/tns-platform-declarations/package.json @@ -1,6 +1,6 @@ { "name": "tns-platform-declarations", - "version": "5.3.1", + "version": "5.3.2", "description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects", "main": "", "scripts": {