Version 7.6.3 causes iOS build failure when running `react-native run-ios`
RSAMUEL12 opened this issue · comments
Bug report
Summary
Problem:
When using version 7.6.3
, the iOS run command fails on the build step with the following error:
The following build commands failed:
CompileC /Users/rohansamuel/Library/Developer/Xcode/DerivedData/zer0-esbqcqprcgmdomgsyaeeypmqhytf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNDateTimePicker.build/Objects-normal/arm64/RNDateTimePickerShadowView.o /Users/rohansamuel/Documents/business/theodo/projects/ua-migration-tests/zero/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNDateTimePicker' from project 'Pods')
(1 failure)
Current solution:
- Downgrade
@react-native-community/datetimepicker
to version7.6.2
react-native run-ios
no longer has the build issue
The source of the Issue seems to be related to the recent PR merged from 7.6.2
to 7.6.3
to use YGConstNodeRef in Shadow View - changing this back fixes the broken build issue
This was tested by reverting the change manually via node_modules/@react-native-community/datetimepicker
inside ios/RNDateTimePickerShadowView.m on line 44
:
- static YGSize RNDateTimePickerShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
+ static YGSize RNDateTimePickerShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
Reproducible sample code
package.json
of the project being used:
{
...
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.19.4",
"@react-native-community/datetimepicker": "7.6.2",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.16",
"@realm/react": "^0.6.2",
"@reduxjs/toolkit": "^1.9.7",
"moment": "^2.29.4",
"react": "18.2.0",
"react-native": "0.72.6",
"react-native-document-picker": "^9.1.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.13.4",
"react-native-get-random-values": "^1.9.0",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-svg": "^14.0.0",
"react-native-svg-charts": "^5.4.0",
"react-native-swiper": "^1.6.0",
"react-native-vector-icons": "^10.0.1",
"react-redux": "^8.1.3",
"realm": "^12.5.0",
"redux": "^4.2.1",
"redux-saga": "^1.2.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@tsconfig/react-native": "^3.0.0",
"@types/react": "^18.0.24",
"@types/react-native-svg-charts": "^5.0.15",
"@types/react-native-vector-icons": "^6.4.16",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8",
"prettier": "^2.4.1",
"react-native-svg-transformer": "^1.3.0",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
}
...
}
Steps to reproduce
yarn
cd ios && pod install
yarn ios
Describe what you expected to happen:
- Expect the Metro server to appear to run my iOS simulator, and for my run command to pass with no issues
On Terminal:
➜ zero git:(master) ✗ yarn ios
yarn run v1.22.19
$ react-native run-ios
info Found Xcode workspace "zer0.xcworkspace"
info Found booted iPhone 13
info Launching iPhone 13
info Building (using "xcodebuild -workspace zer0.xcworkspace -configuration Debug -scheme zer0 -destination id=93488EC2-3F8E-483A-8003-B6B720DEADBA")
success Successfully built the app
2024-03-26 15:03:12.380 xcodebuild[87719:2929173] DVTPlugInQuery: Requested but did not find extension point with identifier 'Xcode.InterfaceBuilderBuildSupport.PlatformDefinition'. This is programmer error; code should only request extension points that are defined by itself or its dependencies.
info Installing "/Users/rohansamuel/Library/Developer/Xcode/DerivedData/zer0-esbqcqprcgmdomgsyaeeypmqhytf/Build/Products/Debug-iphonesimulator/zer0.app on iPhone 13"
info Launching "com.indranil.zer0"
success Successfully launched the app on the simulator
✨ Done in 35.35s.
Environment info
npx react-native info
output:
System:
OS: macOS 14.1
CPU: (8) arm64 Apple M1
Memory: 135.50 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.17.0
path: ~/.nvm/versions/node/v18.17.0/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 9.6.7
path: ~/.nvm/versions/node/v18.17.0/bin/npm
Watchman:
version: 2024.03.18.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK:
API Levels:
- "27"
- "30"
- "31"
- "33"
- "34"
Build Tools:
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.1
- 34.0.0
System Images:
- android-33 | Android TV ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Android TV ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
datetimepicker version: 7.6.3
iOS version: 17.2
Facing the same issue
upgrading to 7.6.3 solved this problem when ii was on 7.3.1 maybe you can try deleting the ios file or try downgrading to a older version @RSAMUEL12
Hello this should be fixed in v8 https://github.com/react-native-datetimepicker/datetimepicker/releases/tag/v8.0.0
Please open a new issue if the problem persists
Thank you!