Datetimepicker: Compile Build failing for react-native 0.62 (IOS)

Created on 6 Apr 2020  ·  12Comments  ·  Source: react-native-datetimepicker/datetimepicker

Bug

When running react-native run-ios build fails.

The following build commands failed:
CompileC /Users/rkasana/Library/Developer/Xcode/DerivedData/ZastOnmove-ghuhgjztjiovtxbhhzofecqaqfnv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNDateTimePicker.build/Objects-normal/x86_64/RNDateTimePickerManager.o /Users/rkasana/Documents/onmove/NewLennon/lennon/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

My podfile contains -
pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec'

Environment info

System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 168.34 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.12.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
API Levels: 23, 25, 27, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
react-native: Not Found

Library version: 2.3.1

Steps To Reproduce

  1. npm install @react-native-community/datetimepicker --save
  2. cd ios && pod install && cd ..
  3. Tried to run react-native run-ios (Build failing and unable to run ios).

Describe what you expected to happen:

  1. Project to run properly
enhancement

Most helpful comment

Hi guys, don't forgot to use the Xcode 11.6 if you update to version 3+

All 12 comments

Is the issue maybe caused coz I don't have use_frameworks enabled ?

I have the same problem ... It is working fine with RN 0.61.5 but with RN 0.62.1 I have the same error.

@rahulkasana thanks for report this problem, I'm working in the solution in the PR #146 I need to test the Android Example App to make a Example App working with react native 0.62.2 I'll make this in the next days, when this PR #146 is merged I'll send a next version of the library in the npm and fix this issue, thanks again!

same issue
temporary solution is changing RNDateTimePickerManager.m

if (@available(iOS 13.0, *)) {
        defaultColor = [UIColor labelColor];
    } else {
        defaultColor = [UIColor blackColor];
    }

to

defaultColor = [UIColor blackColor];

@drachyovmaxim this is not your issue your issue is #133 I'm working in the fix, thanks for the report

@rahulkasana if you use use_native_modules! you could remove this line pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec' of your Podfile

This issue is closed because we have an example working with 0.62.2 version

I had the same problem, I only have to Update Xcode 10 to 11
After that, I tested with iOs 12 and works without problems

I have the same problem, and can't make it work.
The same on RN 0.61.5 as well as 0.63.0.
Tried the Legacy build system but still no luck. I have Xcode 11.

same issue on 0.63.2 here 🙋🏻‍♀️

@rahulkasana if you use use_native_modules! you could remove this line pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec' of your Podfile

Still not working . I have tried installing both version

"@react-native-community/datetimepicker": "^3.0.1”,

"@react-native-community/datetimepicker": "^2.5.0",

Hi guys, don't forgot to use the Xcode 11.6 if you update to version 3+

Was this page helpful?
0 / 5 - 0 ratings