Skip to content

Commit

Permalink
release: ios 9.0.0-dev.3
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Feb 6, 2024
1 parent e7a62de commit c13d61d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion NativeScript/NativeScript-Prefix.pch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
38 changes: 16 additions & 22 deletions NativeScript/runtime/Metadata.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, MembersCollection> getMetasByJSNames(MembersCollection members) {
robin_hood::unordered_map<std::string, MembersCollection> result;
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit c13d61d

Please sign in to comment.