Skip to content

IOS tintColor not defined with iOS 15.0 #585

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

Closed
jonno85 opened this issue Mar 24, 2022 · 2 comments
Closed

IOS tintColor not defined with iOS 15.0 #585

jonno85 opened this issue Mar 24, 2022 · 2 comments

Comments

@jonno85
Copy link

jonno85 commented Mar 24, 2022

Bug report

Summary

After having updated the library to the latest version 6.1.0. The IOS build fails with the following error:

RCT_CUSTOM_VIEW_PROPERTY(accentColor, UIColor, RNDateTimePicker)
{
    if (json) {
        [view setTintColor:[RCTConvert UIColor:json]];
    } else {
        if (@available(iOS 15.0, *)) {
`No known class method for selector 'tintColor'`
            [view setTintColor:[UIColor tintColor]];

        } else {
            [view setTintColor:[UIColor systemBlueColor]];
        }
    }
}

Reproducible sample code

Environment info

npx react-native info output:

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 100.34 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.6 - ~/.nvm/versions/node/v14.17.6/bin/node
    Yarn: 1.22.17 - ~/.yarn/bin/yarn
    npm: 6.14.16 - ~/projects/si/selfinvite/node_modules/.bin/npm
    Watchman: 2022.02.14.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7621141
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.3 => 0.66.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

datetimepicker version: 6.1.0

iOS / Android version: x.x

@vonovak
Copy link
Member

vonovak commented Mar 27, 2022

Hello, I believe you need to upgrade to xCode 13 for this to work (xCode 13 is mentioned in requirements https://github.com/react-native-datetimepicker/datetimepicker#requirements). Alternatively, I'll accept a PR that fixes this for old xCode versions or look at it myself but I need to take care of the existing PRs first, thank you 🙂 👍

@jonno85
Copy link
Author

jonno85 commented Mar 28, 2022

Hi Vonovak.
yes it works with Xcode 13.3. Since 'AppStore' wasn't let me update Xcode, I assumed was already at version 13.

Thanks for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants