Skip to content
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

Compilation Error targeting macCatalyst 13 #2081

Closed
mvignau-snap opened this issue Sep 18, 2020 · 1 comment
Closed

Compilation Error targeting macCatalyst 13 #2081

mvignau-snap opened this issue Sep 18, 2020 · 1 comment

Comments

@mvignau-snap
Copy link

Setup

  • Environment: Eureka 5.3.0 via CocoaPods, macOS 10.15.6, Xcode 12.0.
  • App target iOS 11 and macOS 10.15 (macCatalyst 13)
  • Build for mac Intel (no error when building for iOS)

Compilation Error

/[***]/Pods/Eureka/Source/Rows/DateInlineRow.swift:40:57: error: type 'UIDatePickerStyle' has no member 'inline'
            cell.datePicker.preferredDatePickerStyle = .inline
                                                       ~^~~~~~

Solution

I tried modifying DateInlineRow.swft line 38-40 from:

        if #available(iOS 14.0, *) {
            #if swift(>=5.3)
            cell.datePicker.preferredDatePickerStyle = .inline

to

        if #available(iOS 14.0, macOS 11, *) {
            #if swift(>=5.3)
            cell.datePicker.preferredDatePickerStyle = .inline

But that did not work, so I excluded macCatalyst all together:

        if #available(iOS 14.0, *) {
            #if swift(>=5.3) && !targetEnvironment(macCatalyst)
            cell.datePicker.preferredDatePickerStyle = .inline

This works for my project, but preferredDatePickerStyle = .inline would not be executed if targeting macCatalyst 14

@mats-claassen
Copy link
Member

#2078 Should fix this issue. It has been merged into master. I want to let the dust settle a bit on iOS 14 to see if there are other things to fix but next week there should be a new release

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