From 6720139ec0a700cc194a62a34eb50c04d518fd9c Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Wed, 5 Jun 2019 17:41:58 +0300 Subject: [PATCH] fix(platform-declarations-ios): Change 2^64-1 enum values to -1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `18446744073709551615` (`0xFFFFFFFFFFFFFFFF`) is an overflow to the JS numerical system and therefore incorrect. Integer values from `-(2^53-1)` to `(2^53-1)` only can be safely represented in JS (`Number​.MIN_SAFE_INTEGER` to `Number​.MAX_SAFE_INTEGER`) There's a fix in iOS Runtime's metadata generator which now automatically converts such values to signed. (https://github.com/NativeScript/ios-runtime/pull/1151) refs https://github.com/NativeScript/ios-runtime/issues/1150 --- .../ios/objc-x86_64/objc!MediaPlayer.d.ts | 2 +- .../ios/objc-x86_64/objc!PassKit.d.ts | 2 +- .../ios/objc-x86_64/objc!SceneKit.d.ts | 2 +- tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts | 8 ++++---- .../ios/objc-x86_64/objc!WebKit.d.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tns-platform-declarations/ios/objc-x86_64/objc!MediaPlayer.d.ts b/tns-platform-declarations/ios/objc-x86_64/objc!MediaPlayer.d.ts index 4cf0ab8e4..436cc8f02 100644 --- a/tns-platform-declarations/ios/objc-x86_64/objc!MediaPlayer.d.ts +++ b/tns-platform-declarations/ios/objc-x86_64/objc!MediaPlayer.d.ts @@ -743,7 +743,7 @@ declare const enum MPMediaType { AnyVideo = 65280, - Any = 18446744073709551615 + Any = -1 } declare class MPMovieAccessLog extends NSObject implements NSCopying { diff --git a/tns-platform-declarations/ios/objc-x86_64/objc!PassKit.d.ts b/tns-platform-declarations/ios/objc-x86_64/objc!PassKit.d.ts index 9b763aa5e..b005348a8 100644 --- a/tns-platform-declarations/ios/objc-x86_64/objc!PassKit.d.ts +++ b/tns-platform-declarations/ios/objc-x86_64/objc!PassKit.d.ts @@ -375,7 +375,7 @@ declare const enum PKPassType { Payment = 1, - Any = 18446744073709551615 + Any = -1 } declare class PKPayment extends NSObject { diff --git a/tns-platform-declarations/ios/objc-x86_64/objc!SceneKit.d.ts b/tns-platform-declarations/ios/objc-x86_64/objc!SceneKit.d.ts index 1c99e60d7..2868dce8d 100644 --- a/tns-platform-declarations/ios/objc-x86_64/objc!SceneKit.d.ts +++ b/tns-platform-declarations/ios/objc-x86_64/objc!SceneKit.d.ts @@ -2939,7 +2939,7 @@ declare const enum SCNPhysicsCollisionCategory { Static = 2, - All = 18446744073709551615 + All = -1 } declare class SCNPhysicsConeTwistJoint extends SCNPhysicsBehavior { diff --git a/tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts b/tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts index 3f838f5c8..0b35c8ac4 100644 --- a/tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts +++ b/tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts @@ -4354,7 +4354,7 @@ declare const enum UICollisionBehaviorMode { Boundaries = 2, - Everything = 18446744073709551615 + Everything = -1 } declare class UIColor extends NSObject implements NSCopying, NSItemProviderReading, NSItemProviderWriting, NSSecureCoding { @@ -4831,7 +4831,7 @@ declare const enum UIDataDetectorTypes { None = 0, - All = 18446744073709551615 + All = -1 } interface UIDataSourceModelAssociation { @@ -9348,7 +9348,7 @@ declare const enum UIPopoverArrowDirection { Any = 15, - Unknown = 18446744073709551615 + Unknown = -1 } declare class UIPopoverBackgroundView extends UIView implements UIPopoverBackgroundViewMethods { @@ -10286,7 +10286,7 @@ declare const enum UIRectCorner { BottomRight = 8, - AllCorners = 18446744073709551615 + AllCorners = -1 } declare const enum UIRectEdge { diff --git a/tns-platform-declarations/ios/objc-x86_64/objc!WebKit.d.ts b/tns-platform-declarations/ios/objc-x86_64/objc!WebKit.d.ts index 5f94e389a..374743a55 100644 --- a/tns-platform-declarations/ios/objc-x86_64/objc!WebKit.d.ts +++ b/tns-platform-declarations/ios/objc-x86_64/objc!WebKit.d.ts @@ -7,7 +7,7 @@ declare const enum WKAudiovisualMediaTypes { Video = 2, - All = 18446744073709551615 + All = -1 } declare class WKBackForwardList extends NSObject { @@ -88,7 +88,7 @@ declare const enum WKDataDetectorTypes { LookupSuggestion = 64, - All = 18446744073709551615, + All = -1, SpotlightSuggestion = 64 }