diff --git a/NativeScript/NativeScript-Prefix.pch b/NativeScript/NativeScript-Prefix.pch index 03b07468..191b47b7 100644 --- a/NativeScript/NativeScript-Prefix.pch +++ b/NativeScript/NativeScript-Prefix.pch @@ -1,7 +1,7 @@ #ifndef NativeScript_Prefix_pch #define NativeScript_Prefix_pch -#define NATIVESCRIPT_VERSION "9.0.0-alpha.3" +#define NATIVESCRIPT_VERSION "9.0.0-dev.3" #ifdef DEBUG #define SIZEOF_OFF_T 8 diff --git a/NativeScript/runtime/Metadata.mm b/NativeScript/runtime/Metadata.mm index 77bc8ecb..f8d80d43 100644 --- a/NativeScript/runtime/Metadata.mm +++ b/NativeScript/runtime/Metadata.mm @@ -17,24 +17,22 @@ void LogMetadataUnavailable(const char* identifierString, uint8_t majorVersion, ); } -// #ifndef TARGET_OS_VISION /** * \brief Gets the system version of the current device. */ -// static UInt8 getSystemVersion() { -// static UInt8 iosVersion; -// if (iosVersion != 0) { -// return iosVersion; -// } - -// NSString* version = [[UIDevice currentDevice] systemVersion]; -// NSArray* versionTokens = [version componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"."]]; -// UInt8 majorVersion = (UInt8)[versionTokens[0] intValue]; -// UInt8 minorVersion = (UInt8)[versionTokens[1] intValue]; - -// return iosVersion = encodeVersion(majorVersion, minorVersion); -// } -// #endif +static UInt8 getSystemVersion() { + static UInt8 iosVersion; + if (iosVersion != 0) { + return iosVersion; + } + + NSString* version = [[UIDevice currentDevice] systemVersion]; + NSArray* versionTokens = [version componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"."]]; + UInt8 majorVersion = (UInt8)[versionTokens[0] intValue]; + UInt8 minorVersion = (UInt8)[versionTokens[1] intValue]; + + return iosVersion = encodeVersion(majorVersion, minorVersion); +} robin_hood::unordered_map getMetasByJSNames(MembersCollection members) { robin_hood::unordered_map result; @@ -46,13 +44,9 @@ void LogMetadataUnavailable(const char* identifierString, uint8_t majorVersion, // Meta bool Meta::isAvailable() const { -// #if TARGET_OS_VISION - return true; -// #else -// UInt8 introducedIn = this->introducedIn(); -// UInt8 systemVersion = getSystemVersion(); -// return introducedIn == 0 || introducedIn <= systemVersion; -// #endif + UInt8 introducedIn = this->introducedIn(); + UInt8 systemVersion = getSystemVersion(); + return introducedIn == 0 || introducedIn <= systemVersion; } // MethodMeta class diff --git a/package.json b/package.json index 46ef31ac..a13a7d9c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@nativescript/visionos", - "description": "NativeScript Runtime for visionOS", - "version": "9.0.0-alpha.3", + "name": "@nativescript/ios", + "description": "NativeScript Runtime for iOS", + "version": "9.0.0-dev.3", "keywords": [ "NativeScript", "iOS",