iOS 18.2 simulator build time error: `compiling for iOS 15.1, but module 'CxxStdlib' has a minimum deployment target of iOS 16.0`
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
EmitSwiftModule normal arm64 (in target 'NitroModules' from project 'Pods')
cd /Users/teemo/Work/test/nomadRN/ios/Pods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/core/AnyMapHolder.swift /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/core/ArrayBufferHolder.swift /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/core/HybridObjectSpec.swift /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/core/Promise.swift /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/core/RuntimeError.swift /Users/teemo/Work/test/nomadRN/node_modules/react-native-nitro-modules/ios/utils/SwiftClosure.swift -target arm64-apple-ios15.1-simulator -Xllvm -aarch64-use-tbi -enable-objc-interop -cxx-interoperability-mode\=default -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -I /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Products/Debug-iphonesimulator/NitroModules -F /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Products/Debug-iphonesimulator/NitroModules -F /Users/teemo/Work/test/nomadRN/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -no-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -import-underlying-module -module-cache-path /Users/teemo/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity\=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -const-gather-protocols-file /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules_const_extract_protocols.json -enable-experimental-feature DebugDescriptionMacro -enable-experimental-feature OpaqueTypeErasure -enable-bare-slash-regex -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/teemo/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/teemo/Work/test/nomadRN/ios/Pods -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /Users/teemo/Work/test/nomadRN/ios/Pods -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCTDeprecation/RCTDeprecation.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCTFabric/React-RCTFabric.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React/React-Core.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/ReactCodegen/ReactCodegen.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React_Fabric/React-Fabric.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React_FabricComponents/React-FabricComponents.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/glog/glog.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/jsi/React-jsi.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/jsinspector_modern/React-jsinspector.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_debug/React-debug.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_featureflags/React-featureflags.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_renderer_graphics/React-graphics.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_renderer_imagemanager/React-ImageManager.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/react_utils/React-utils.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/reacthermes/React-hermes.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/yoga/Yoga.modulemap -Xcc -fmodule-map-file\=/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/NitroModules/NitroModules.modulemap -Xcc -std\=c++20 -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/teemo/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/NitroModules-generated-files.hmap -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/NitroModules-own-target-headers.hmap -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/NitroModules-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-8699adb1dd336b26511df848a716bd42-VFS-iphonesimulator/all-product-headers.yaml -Xcc -iquote -Xcc /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/NitroModules-project-headers.hmap -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Products/Debug-iphonesimulator/NitroModules/include -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Private -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Private/NitroModules -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/FBLazyVector -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCT-Folly -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCTRequired -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/RCTTypeSafety -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-Core -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-Fabric -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-FabricComponents -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-FabricImage -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-ImageManager -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-NativeModulesApple -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-RCTFabric -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-RCTText -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-callinvoker -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-debug -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-featureflags -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-graphics -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-hermes -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-jsi -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-logger -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-nativeconfig -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-perflogger -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-performancetimeline -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-rendererconsistency -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-rendererdebug -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-runtimeexecutor -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-runtimescheduler -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-timing -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/React-utils -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/ReactCodegen -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/ReactCommon -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/Yoga -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/boost -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/fmt -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/glog -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Public/hermes-engine -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/boost -Xcc -I/Users/teemo/Work/test/nomadRN/ios/Pods/Headers/Private/Yoga -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/DerivedSources-normal/arm64 -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/DerivedSources/arm64 -Xcc -I/Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG\=1 -Xcc -DDEBUG\=1 -Xcc -DCOCOAPODS\=1 -Xcc -DPOD_CONFIGURATION_DEBUG\=1 -Xcc -DDEBUG\=1 -Xcc -DFOLLY_NO_CONFIG -Xcc -DFOLLY_CFG_NO_COROUTINES -module-name NitroModules -frontend-parseable-output -disable-clang-spi -target-sdk-version 18.2 -target-sdk-name iphonesimulator18.2 -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/local/lib/swift/host/plugins\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins -emit-module-doc-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules.swiftdoc -emit-module-source-info-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules.swiftsourceinfo -emit-objc-header-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules-Swift.h -serialize-diagnostics-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules-master-emit-module.dia -emit-dependencies-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules-master-emit-module.d -o /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules.swiftmodule -emit-abi-descriptor-path /Users/teemo/Library/Developer/Xcode/DerivedData/nomad-aoeqyjjllnqfjibiyhrishyluhbb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/NitroModules.build/Objects-normal/arm64/NitroModules.abi.json
<unknown>:0: 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
Project dependencies
"dependencies": {
"@expo/vector-icons": "^14.0.4",
"@react-navigation/bottom-tabs": "^7.0.0",
"@react-navigation/native": "^7.0.0",
"@reduxjs/toolkit": "^2.5.0",
"@shopify/flash-list": "~1.7.2",
"@shopify/react-native-skia": "~1.7.2",
"add": "^2.0.6",
"dayjs": "^1.11.13",
"eslint": "^8.56.0",
"expo": "~52.0.18",
"expo-asset": "~11.0.1",
"expo-blur": "~14.0.1",
"expo-build-properties": "~0.13.1",
"expo-constants": "~17.0.3",
"expo-device": "~7.0.1",
"expo-font": "~13.0.1",
"expo-haptics": "~14.0.0",
"expo-linking": "~7.0.3",
"expo-router": "~4.0.11",
"expo-splash-screen": "~0.29.18",
"expo-status-bar": "~2.0.0",
"expo-symbols": "~0.2.0",
"expo-system-ui": "~4.0.5",
"expo-web-browser": "~14.0.1",
"lodash": "^4.17.21",
"prettier": "^3.4.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-error-boundary": "^4.1.2",
"react-hook-form": "^7.54.0",
"react-native": "~0.76.5",
"react-native-calendars": "^1.1307.0",
"react-native-edge-to-edge": "^1.1.3",
"react-native-gesture-handler": "~2.21.2",
"react-native-get-random-values": "~1.11.0",
"react-native-mmkv": "^3.1.0",
"react-native-nitro-modules": "^0.18.2",
"react-native-reanimated": "~3.16.5",
"react-native-safe-area-context": "5.0.0",
"react-native-screens": "~4.3.0",
"react-native-svg": "15.10.1",
"react-native-svg-transformer": "~1.5.0",
"react-native-swipeable-item": "~2.0.9",
"react-native-unistyles": "^3.0.0-beta.1",
"react-native-web": "~0.19.13",
"react-native-webview": "~13.12.5",
"react-redux": "^9.1.2",
"redux-persist": "^6.0.0"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@redux-devtools/remote": "^0.9.3",
"@types/jest": "^29.5.14",
"@types/react": "~18.3.13",
"@types/react-test-renderer": "^18.3.0",
"jest": "~29.7.0",
"jest-expo": "~52.0.2",
"react-test-renderer": "18.3.1",
"typescript": "^5.7.2"
},
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
- [X] I am using Expo
- [ ] I am using Nitrogen (nitro-codegen)
- [X] I have read and followed the Troubleshooting Guide.
- [ ] I created a reproduction PR to reproduce this issue here in the nitro repo. (See Contributing for more information)
- [X] I searched for similar issues in this repository and found none.
yeah, but i did this in app.json without any effect on this problem https://docs.expo.dev/versions/latest/sdk/build-properties/#example-appjson-with-config-plugin
[
"expo-build-properties",
{
"ios": {
"newArchEnabled": true,
"deploymentTarget": "16.6"
},
"android": {
"newArchEnabled": true
}
}
]
this is probably expo issue
reverting to previous expo and RN didn't help. I have also downloaded and installed new ios 18.2 simulator today. Could it be the reason?
Minimum deployments is set to 16.6
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: Seems that it should get downgraded for Swift 6.1 ? https://github.com/swiftlang/swift/pull/77979
yeah. xcode was updated today...
@mrousavy https://github.com/jpudysz/react-native-unistyles/tree/v3.0.0-beta.2 here this example doesn't compile with same error related to nitro
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 :
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:499FEC7E-7743-4FE3-8000-8C08EE1D2D90, OS:18.0, name:iPhone 16 Pro }
{ platform:iOS Simulator, id:499FEC7E-7743-4FE3-8000-8C08EE1D2D90, OS:18.0, name:iPhone 16 Pro }
** BUILD FAILED **
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 io182repro with scheme io182repro and configuration Debug
(3 failures)
Here is the log for iOS 18.2
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:62528D40-C959-4828-AFA4-81E30CB3AB67, OS:18.2, name:iPhone 16 Pro }
{ platform:iOS Simulator, id:62528D40-C959-4828-AFA4-81E30CB3AB67, OS:18.2, name:iPhone 16 Pro }
** BUILD FAILED **
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 io182repro with scheme io182repro and configuration Debug
(3 failures)
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. I made this repro repo with fresh expo install + unistyles only. Don't know if it helps.
Should I open an issue on unistyles repo ?
I guess I did not pay attention and updated Xcode to 16.2, and now one of my project running [react-native-unistyles]
unistyle betta uses nitro module
Should I open an issue on unistyles repo ?
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 :ios => min_ios_version_supported, in podfile runtime.
I believe this issue can be temporarily resolved by modifying the Podfile with a post-install hook. You can add the following code to your Podfile:
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 https://github.com/swiftlang/swift/commit/b87b263742d55a2187c188f5d3db1517ea5d3740 which was reported in https://github.com/swiftlang/swift/issues/77909 and then fixed in https://github.com/swiftlang/swift/pull/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 for each target -> General -> Minimum deployments -> IOS: 16 build settings -> iOS Deployment target -> iOS 16
- same thing for PODS: Project -> Pods -> build settings -> iOS Deployment target -> iOS 16 For each Target in there with same error repeat same steps
but this is crazy to repeat each time i do expo prebuild :)
The issue will be fixed by https://github.com/swiftlang/swift/pull/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.
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
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.
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 believe this issue can be temporarily resolved by modifying the
Podfilewith a post-install hook. You can add the following code to yourPodfile: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!
i'm using react-native cli. fixed for me
I believe this issue can be temporarily resolved by modifying the
Podfilewith a post-install hook. You can add the following code to yourPodfile: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!
worked for me
To extend on the config plugin @corasan shared, you can also select the minimum deployment target at build time by adjusting the config plugin as follows:
const fs = require('fs');
const path = require('path');
const { withDangerousMod } = require('@expo/config-plugins');
const { mergeContents } = require('@expo/config-plugins/build/utils/generateCode');
const xcode = require('xcode');
const IOS_DEPLOYMENT_TARGET = '16.6';
const withIosDeploymentTarget = (config) => {
return withDangerousMod(config, [
'ios',
async (config) => {
// Find the Podfile
const podfile = path.join(config.modRequest.platformProjectRoot, 'Podfile');
const podfileContents = fs.readFileSync(podfile, 'utf8');
// Merge the contents of the Podfile to set deployment target
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'] = '${IOS_DEPLOYMENT_TARGET}'
end
end`,
anchor: /post_install do \|installer\|/i,
offset: 1,
comment: '#',
});
if (!setDeploymentTarget.didMerge) {
console.log('Failed to set iOS deployment target in Podfile');
return config;
}
fs.writeFileSync(podfile, setDeploymentTarget.contents);
// Update the Xcode project file
const pbxprojPath = path.join(
config.modRequest.platformProjectRoot,
'YOUR_PROJECT_NAME_HERE.xcodeproj',
'project.pbxproj'
);
const project = xcode.project(pbxprojPath);
project.parseSync();
// Update the minimum deployment target in all build configurations
Object.values(project.pbxXCBuildConfigurationSection())
.filter((config) => config.buildSettings)
.forEach((config) => {
config.buildSettings.IPHONEOS_DEPLOYMENT_TARGET = IOS_DEPLOYMENT_TARGET;
});
fs.writeFileSync(pbxprojPath, project.writeSync());
console.log(`iOS Deployment target successfully set to ${IOS_DEPLOYMENT_TARGET}`);
return config;
},
]);
};
module.exports = withIosDeploymentTarget;
Just remember to change "YOUR_PROJECT_NAME_HERE".
@kickbk ah nice. I've been using expo-build-properties to change the deployment target of the project.
Looks like the fix for this is landing in xcode 16.3 which is in beta right now.
https://xcodereleases.com/
https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes#Swift
Xcode 16.3 is out. I tested with min_ios_version_supported for my libraries and this issue is now fixed.
Just an update about this but the error is still happening if you have Xcode 16.3 and rn 0.79.1, i was struggling about the same problem and it appear that going back to rn 0.76.9 solve the problem
Just an update about this but the error is still happening if you have Xcode 16.3 and rn 0.79.1, i was struggling about the same problem and it appear that going back to rn 0.76.9 solve the problem
I'm on React Native 0.79.1 and Xcode 16.3 and not experience said issue
Just an update about this but the error is still happening if you have Xcode 16.3 and rn 0.79.1, i was struggling about the same problem and it appear that going back to rn 0.76.9 solve the problem, neither going to xcode 16.3.
I'm on React Native 0.79.1 and Xcode 16.3 and not experience said issue
You are right, i though my problem relies here but the build still didn't work.
Let me correct myself, the version of react native does not fix it, i finally found that i had to set the ios xcode image in eas.json:
"ios": { "image": "macos-sonoma-14.6-xcode-16.1" },
First, i was using "latest" image value but for some weird reason that doesn't change nothing. But when i manually set "macos-sonoma-14.6-xcode-16.1" then the build do not failed.
This strange behavior might come from something else in my project and for some reason writting this specific value fix it but after investigation i didn't find others part of code responsible of my problem.
So i help that can help some people.
Just an update about this but the error is still happening if you have Xcode 16.3 and rn 0.79.1, i was struggling about the same problem and it appear that going back to rn 0.76.9 solve the problem, neither going to xcode 16.3.
I'm on React Native 0.79.1 and Xcode 16.3 and not experience said issue
You are right, i though my problem relies here but the build still didn't work. Let me correct myself, the version of react native does not fix it, i finally found that i had to set the ios xcode image in
eas.json:
"ios": { "image": "macos-sonoma-14.6-xcode-16.1" },First, i was using "latest" image value but for some weird reason that doesn't change nothing. But when i manually set "macos-sonoma-14.6-xcode-16.1" then the build do not failed.
This strange behavior might come from something else in my project and for some reason writting this specific value fix it but after investigation i didn't find others part of code responsible of my problem.
So i help that can help some people.
Because the latest image is probably on Xcode 16.2.
I can also confirm that updating Xcode from 16.2 to 16.3 fixed the issue!
Nice! I'm closing this now since Xcode 16.3 fixed the issue.
Dễ thương! Tôi đang đóng điều này ngay bây giờ vì Xcode 16.3 đã khắc phục sự cố.
Oh my god. you save me. ❤️