You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document how to specify minimum versions for target platforms, and provide sensible defaults #174
For a quick check, I tried process.dlopen to run the existing macOS slice in Node.js, but I got an error that it was built for macOS 15.2, which is newer than my running OS.
This brings to my attention that we will need to document how to configure minimum versions in cmake, and provide sensible defaults for all platforms. At present, it doesn't seem like it's configured at all. Ideally, it should track the minimum versions used by react-native, react-native-macos, etc.
This should be configurable (and we should document that) by setting the CMAKE_OSX_DEPLOYMENT_TARGET variable. Either in your project's CMake configuration or since #239 by passing -D CMAKE_OSX_DEPLOYMENT_TARGET=15.2 when calling cmake-rn.
For discoverability and ease of use, we might want to add an option (--minimum-apple-target?) to cmake-rn similar to the --android-sdk-version we already have for Android:
So generally, it's setting the version-min for the OS, but in some cases it's setting the target. This doesn't get me any closer to a better name than --minimum-apple-target, though. I guess all we can do is pick a name for the flag and just support it adequately with documentation, especially for the odd cases like macOS and Catalyst.
In case it comes up, here is how I handled CMAKE_OSX_DEPLOYMENT_TARGET for the very odd case of Catalyst (which brings the "is it iOS or OS X" question).
Activity
kraenhansen commentedon Oct 24, 2025
This should be configurable (and we should document that) by setting the
CMAKE_OSX_DEPLOYMENT_TARGETvariable. Either in your project's CMake configuration or since #239 by passing-D CMAKE_OSX_DEPLOYMENT_TARGET=15.2when callingcmake-rn.For discoverability and ease of use, we might want to add an option (
--minimum-apple-target?) tocmake-rnsimilar to the--android-sdk-versionwe already have for Android:react-native-node-api/packages/cmake-rn/src/platforms/android.ts
Lines 41 to 44 in f00d2bb
shirakaba commentedon Oct 24, 2025
When I read
--minimum-apple-target, I am unclear what number I should put in when developing for both iOS and macOS.Ultimately,
CMAKE_OSX_DEPLOYMENT_TARGETis treated like this:So generally, it's setting the
version-minfor the OS, but in some cases it's setting the target. This doesn't get me any closer to a better name than--minimum-apple-target, though. I guess all we can do is pick a name for the flag and just support it adequately with documentation, especially for the odd cases like macOS and Catalyst.In case it comes up, here is how I handled
CMAKE_OSX_DEPLOYMENT_TARGETfor the very odd case of Catalyst (which brings the "is it iOS or OS X" question).