-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Realm Core 13.2.0 #5252
Changes from 13 commits
a301c58
c20880a
677ac36
9196873
9cbb86d
2f5a9cc
909fc43
57eea36
5c97c7b
737e1b3
3e29151
6432d28
2503688
1734e15
07ae781
0811829
91740e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
PACKAGE_NAME=realm-js | ||
VERSION=11.4.0 | ||
REALM_CORE_VERSION=13.1.2 | ||
REALM_CORE_VERSION=13.2.0 | ||
NAPI_VERSION=5 | ||
MDBREALM_TEST_SERVER_TAG=2022-06-10 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -134,40 +134,91 @@ module.exports = { | |||||
}, | ||||||
|
||||||
/** | ||||||
* | ||||||
* References: | ||||||
* - https://github.com/facebook/react-native/blob/main/Libraries/Utilities/Platform.ios.js | ||||||
* - https://github.com/facebook/react-native/blob/main/Libraries/Utilities/NativePlatformConstantsAndroid.js | ||||||
* | ||||||
* @returns An object with names and versions of the various components making up the context. | ||||||
*/ | ||||||
getVersions() { | ||||||
const packageJson = require("../package.json"); | ||||||
const packageVersion = packageJson.version; | ||||||
const sdkVersion = packageJson.version; | ||||||
const environment = this.getEnvironment(); | ||||||
|
||||||
const sdk = "JS"; | ||||||
|
||||||
try { | ||||||
if (environment === "reactnative") { | ||||||
const { Platform } = require("react-native"); | ||||||
let deviceName = "unknown"; | ||||||
let deviceVersion = "unknown"; | ||||||
if (Platform.OS === "ios") { | ||||||
if (Platform.isPad()) { | ||||||
deviceName = "iPad"; | ||||||
} else if (Platform.isTV()) { | ||||||
deviceName = "AppleTV"; | ||||||
} else { | ||||||
// RN doesn't support Apple Watch | ||||||
deviceName = "iPhone"; | ||||||
} | ||||||
deviceVersion = "unknown"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should be able to use
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't found a way to tell me if it is an iPhone 10 or iPhone 11. |
||||||
} else if (Platform.OS === "android") { | ||||||
deviceName = `${Platform.Manufacturer}:${Platform.Brand}`; | ||||||
kneth marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
deviceVersion = `${Platform.Model}`; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The react native docs on this, describes the
What is the intended semantics of this property exactly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The specification split "Samsung GT-I9100" so deviceName is "Samsung" and deviceVersion is "GT-I9100", and I have interpreted deviceVersion as the model. |
||||||
} | ||||||
|
||||||
return { | ||||||
packageVersion, | ||||||
platformContext: environment, | ||||||
platformOs: Platform.OS, | ||||||
sdk, | ||||||
sdkVersion, | ||||||
|
||||||
platform: Platform.OS, | ||||||
// Android reports a number ... | ||||||
platformVersion: `${Platform.Version}`, | ||||||
|
||||||
deviceName, | ||||||
deviceVersion, | ||||||
|
||||||
cpuArch: "unknown", // Detecting CPU architecture on Android and iOS is done by seperate methods in platform.{mm, cpp) | ||||||
|
||||||
frameworkName: "RN", | ||||||
kneth marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
frameworkVersion: Object.values(Platform.constants.reactNativeVersion).join("."), | ||||||
}; | ||||||
} else if (environment === "node.js" || environment === "electron") { | ||||||
const platform = os.type(); // eslint-disable-line | ||||||
const platformVersion = os.release(); // eslint-disable-line | ||||||
const cpuArch = os.arch(); // eslint-disable-line | ||||||
|
||||||
return { | ||||||
packageVersion, | ||||||
platformContext: environment, | ||||||
platformOs: process.platform, | ||||||
platformVersion: process.versions.electron || process.version, | ||||||
sdk, | ||||||
sdkVersion, | ||||||
|
||||||
platform, | ||||||
platformVersion, | ||||||
|
||||||
deviceName: "unknown", | ||||||
deviceVersion: "unknown", | ||||||
|
||||||
cpuArch, | ||||||
|
||||||
frameworkName: environment, | ||||||
frameworkVersion: process.versions.electron || process.version, | ||||||
}; | ||||||
} | ||||||
} catch (err) { | ||||||
console.warn("Error getting versions:", err.stack); | ||||||
} | ||||||
|
||||||
return { | ||||||
packageVersion, | ||||||
platformContext: environment, | ||||||
platformOs: "unknown", | ||||||
platform: "unknown-platform", | ||||||
platformVersion: "?.?.?", | ||||||
sdkVersion: "?.?.?", | ||||||
sdk: "unknown-sdk", | ||||||
cpuArch: "unknown-cpu-arch", | ||||||
deviceName: "unknown-device-name", | ||||||
deviceVersion: "?.?.?", | ||||||
frameworkName: "unknown-framework-name", | ||||||
frameworkVersion: "?.?.?", | ||||||
kneth marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
}; | ||||||
}, | ||||||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kneth, these caused a regression since
Platform.isPad
andPlatform.isTV
are boolean properties (not methods).Please see: https://reactnative.dev/docs/platform#ispad-ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appden Thank you for reporting. I have a fix in #5491.