-
Notifications
You must be signed in to change notification settings - Fork 26
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
iOS 18.2 simulator build time error: compiling for iOS 15.1, but module 'CxxStdlib' has a minimum deployment target of iOS 16.0
#422
Comments
You are using 15.1., but need to use iOS 16. |
yeah, but i did this in app.json without any effect on this problem [
"expo-build-properties",
{
"ios": {
"newArchEnabled": true,
"deploymentTarget": "16.6"
},
"android": {
"newArchEnabled": true
}
}
] this is probably expo issue |
Seems to be something related to Xcode. Started getting this too just few minutes ago after updating to Xcode 16.2. Was building completely fine this morning prior 16.2 Edit: |
yeah. xcode was updated today... |
@mrousavy https://github.com/jpudysz/react-native-unistyles/tree/v3.0.0-beta.2 |
I guess I did not pay attention and updated Xcode to 16.2, and now one of my project running react-native-unistyles is not building anymore (was building yesterday morning). Other project without this package are building fine. Here is the expo log when building on sim iOS18.0 :
Here is the log for iOS 18.2
Weird thing is, it is actually building on real device (iOS 18.2). I found this issue but not sure if related to nitro modules or unistyles actually. Should I open an issue on unistyles repo ? |
unistyle betta uses nitro module
i have open a question. it is not a Unistyle or RN/Expo issue, they are being build fine on my machine with xcode 16.2 this issue is related to value of min_ios_version_supported |
I believe this issue can be temporarily resolved by modifying the post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.6'
end
end
end Test this and see if it resolves the problem! |
Can confirm @katanyaJATI 's workaround works. |
on RN projects it will work but it's hardcoded version for targets. what it work for pods? I have noticed that expo build properties plugin doesn't change 2 of 4 IPHONEOS_DEPLOYMENT_TARGET values in xcodeproj file... |
Hey - yea I'm getting the same error now after upgrading to Xcode 16.2. Seems like they broke something in swiftlang/swift@b87b263 which was reported in swiftlang/swift#77909 and then fixed in swiftlang/swift#77979. It looks like the fix didn't land in Xcode 16.2., as I still see the error: - Compiling for iOS 15.1, but module 'CxxStdlib' has a minimum deployment target of iOS 16.0: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CxxStdlib.swiftmodule/arm64-apple-ios-simulator.swiftmodule |
i managed to build my project after i have set
but this is crazy to repeat each time i do expo prebuild :) |
The issue will be fixed by swiftlang/swift#78242. Note: the build still works fine for physical devices, for "My Mac", for tvOS, and visionOS targets. It's "just" iOS Simulators that are not working right now in Xcode 16.2. |
compiling for iOS 15.1, but module 'CxxStdlib' has a minimum deployment target of iOS 16.0
Manually downloading the latest Swift development snapshot here and selecting the toolchain resolved this issue for me, but led to other issues related to Yoga for me. As a workaround, without having to do any manual configurations, I downgraded to Xcode 16.1. |
did downgrade on xCode as well |
Hello, please can you share the process for applying this fix you mentioned to Xcode 16.2? Where I can locate the "stdlib/cmake/modules/SwiftSource.cmake" file to add the changes for the ios simulator? Thanks in advance |
I wrote this config plugin for expo to set the targets to iOS 16.0. Should be enough for now until Xcode releases the fix. const { withDangerousMod } = require('@expo/config-plugins');
const { mergeContents } = require('@expo/config-plugins/build/utils/generateCode');
const fs = require('fs');
const path = require('path');
const withIosDeploymentTarget = (config) => {
return withDangerousMod(config, [
'ios',
async (config) => {
// Find the Podfile
const podfile = path.join(config.modRequest.platformProjectRoot, 'Podfile')
// Read the Podfile
const podfileContents = fs.readFileSync(podfile, 'utf8')
// Merge the contents of the Podfile with the new content setting
// the deployment target of all targets to 16.0
const setDeploymentTarget = mergeContents({
tag: 'ios-deployment-target',
src: podfileContents,
newSrc: ` installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
end
end`,
anchor: /post_install do \|installer\|/i,
offset: 1,
comment: '#'
})
if (!setDeploymentTarget.didMerge) {
console.log('Failed to set iOS deployment target')
return config
}
fs.writeFileSync(podfile, setDeploymentTarget.contents)
return config
}
])
}
module.exports = withIosDeploymentTarget; |
i'm using react-native cli. fixed for me |
How were you trying to build the app?
expo -> prebuild
expo -> ios
The following build commands failed:
EmitSwiftModule normal arm64 (in target 'NitroModules' from project 'Pods')
SwiftEmitModule normal arm64 Emitting\ module\ for\ NitroModules (in target 'NitroModules' from project 'Pods')
Building workspace nomad with scheme nomad and configuration Debug
Full build logs
Project dependencies
Nitro Modules Version
^0.18.2
Nitrogen Version
No response
Target platforms
iOS
Operating system
MacOS
Can you build the Nitro Modules Example app?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information
The text was updated successfully, but these errors were encountered: