diff --git a/CHANGELOG.md b/CHANGELOG.md index e511bdab1..7dc5973a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ + +## [6.1.2](https://github.com/NativeScript/NativeScript/compare/6.1.1...6.1.2) (2019-10-15) + + +### Bug Fixes + +* expose orientation to application module ([#7832](https://github.com/NativeScript/NativeScript/issues/7832)) ([4166e2d](https://github.com/NativeScript/NativeScript/commit/4166e2d)) +* **frame-android:** IllegalStateException: The specified child already has a parent ([#7948](https://github.com/NativeScript/NativeScript/issues/7948)) ([ff30c48](https://github.com/NativeScript/NativeScript/commit/ff30c48)) +* **tabs-ios9:** no view controller managing visible view error ([#7837](https://github.com/NativeScript/NativeScript/issues/7837)) ([7fe8d1c](https://github.com/NativeScript/NativeScript/commit/7fe8d1c)) + + +### Features + +* **css:** add attribute scoped css without global refresh ([#7907](https://github.com/NativeScript/NativeScript/issues/7907)) ([#7947](https://github.com/NativeScript/NativeScript/issues/7947)) ([b377eb6](https://github.com/NativeScript/NativeScript/commit/b377eb6)) + + + ## [6.1.1](https://github.com/NativeScript/NativeScript/compare/6.1.0...6.1.1) (2019-09-11) diff --git a/tests/app/ui/image-cache/image-cache-tests.ts b/tests/app/ui/image-cache/image-cache-tests.ts index 2650ae4fe..29670e6e1 100644 --- a/tests/app/ui/image-cache/image-cache-tests.ts +++ b/tests/app/ui/image-cache/image-cache-tests.ts @@ -1,6 +1,7 @@ import * as imageCacheModule from "tns-core-modules/ui/image-cache"; import * as imageSource from "tns-core-modules/image-source"; import * as types from "tns-core-modules/utils/types"; +import { isAndroid } from "tns-core-modules/platform"; import { device } from "tns-core-modules/platform"; import lazy from "tns-core-modules/utils/lazy"; @@ -10,7 +11,7 @@ const sdkVersion = lazy(() => parseInt(device.sdkVersion)); export const test_ImageCache_ValidUrl = function () { // see https://github.com/NativeScript/NativeScript/issues/6643 - if (sdkVersion() < 20) { + if (isAndroid && sdkVersion() < 20) { return; } diff --git a/tests/app/xml-parser-tests/xml-parser-tests.ts b/tests/app/xml-parser-tests/xml-parser-tests.ts index c14aa549b..67a819756 100644 --- a/tests/app/xml-parser-tests/xml-parser-tests.ts +++ b/tests/app/xml-parser-tests/xml-parser-tests.ts @@ -6,6 +6,11 @@ import * as TKUnit from "../tk-unit"; import * as xmlModule from "tns-core-modules/xml"; import * as fs from "tns-core-modules/file-system"; import * as builder from "tns-core-modules/ui/builder"; +import { isIOS } from "tns-core-modules/platform"; +import { device } from "tns-core-modules/platform"; +import lazy from "tns-core-modules/utils/lazy"; + +const sdkVersion = lazy(() => parseInt(device.sdkVersion)); export var test_XmlParser_IsDefined = function () { TKUnit.assertNotEqual(xmlModule.XmlParser, undefined, "Class XmlParser should be defined!"); @@ -94,6 +99,10 @@ export var test_XmlParser_OnErrorIsCalledWhenAnErrorOccurs = function () { }; export var test_XmlParser_IntegrationTest = function () { + if (isIOS && sdkVersion() < 10) { + return; + } + var actualResult = ""; var xmlParser = new xmlModule.XmlParser(function (event: xmlModule.ParserEvent) { if (event.eventType === xmlModule.ParserEventType.Text && event.data.trim() === "") { @@ -194,6 +203,10 @@ export var test_XmlParser_DummyDocumentationTest = function () { }; export var test_XmlParser_NamespacesTest = function () { + if (isIOS && sdkVersion() < 10) { + return; + } + var xmlParser = new xmlModule.XmlParser(function (event: xmlModule.ParserEvent) { if (event.eventType !== xmlModule.ParserEventType.StartElement) { return; diff --git a/tns-core-modules/ui/tabs/tabs.ios.ts b/tns-core-modules/ui/tabs/tabs.ios.ts index befa5a202..272b53dd8 100644 --- a/tns-core-modules/ui/tabs/tabs.ios.ts +++ b/tns-core-modules/ui/tabs/tabs.ios.ts @@ -22,7 +22,16 @@ import { swipeEnabledProperty, TabsBase } from "./tabs-common"; export * from "./tabs-common"; const majorVersion = iosUtils.MajorVersion; -// const isPhone = device.deviceType === "Phone"; + +// Equivalent to dispatch_async(dispatch_get_main_queue(...)) call +const invokeOnRunLoop = (function() { + const runloop = CFRunLoopGetMain(); + + return (action: () => any) => { + CFRunLoopPerformBlock(runloop, kCFRunLoopDefaultMode, action); + CFRunLoopWakeUp(runloop); + }; +}()); class MDCTabBarDelegateImpl extends NSObject implements MDCTabBarDelegate { public static ObjCProtocols = [MDCTabBarDelegate]; @@ -1074,6 +1083,11 @@ export class Tabs extends TabsBase { this._currentNativeSelectedIndex = value; this.viewController.setViewControllersDirectionAnimatedCompletion(controllers, navigationDirection, true, (finished: boolean) => { if (finished) { + if (majorVersion < 10) { + // HACK: UIPageViewController fix; see https://stackoverflow.com/a/17330606 + invokeOnRunLoop(() => this.viewController.setViewControllersDirectionAnimatedCompletion(controllers, navigationDirection, false, null)); + } + this._canSelectItem = true; this._setCanBeLoaded(value); this._loadUnloadTabItems(value);