react-native-orientation-director 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-orientation-director",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "description": "A Modern React Native library that allows you to access orientation",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/module/src/index.d.ts",
@@ -60,15 +60,18 @@ function swiftFileUpdater(originalContents, sdkVersion) {
60
60
  if (!_sdkVersion) {
61
61
  return '';
62
62
  }
63
- const sdkVersionAsNumber = Number(_sdkVersion);
64
- if (Number.isNaN(sdkVersionAsNumber)) {
63
+ const rawMajor = _sdkVersion.split('.').at(0);
64
+ if (!rawMajor) {
65
65
  return '';
66
66
  }
67
- if (sdkVersionAsNumber >= 53) {
67
+ const major = Number(rawMajor);
68
+ if (Number.isNaN(major)) {
68
69
  return '';
69
70
  }
70
- // Older SDK versions need the override keyword
71
- return 'override';
71
+ if (major === 53) {
72
+ return '';
73
+ }
74
+ return 'public override';
72
75
  }
73
76
  }
74
77
  function objCFileUpdater(originalContents) {