Q-Mobile / QGrid

🎛 QGrid: The missing SwiftUI collection view.
MIT License
1.64k stars 104 forks source link

Use of unresolved identifier 'UIDevice' #5

Closed melgu closed 5 years ago

melgu commented 5 years ago

Upon adding the Swift Package, I get the compile time error Use of unresolved identifier 'UIDevice'even when not using the package yet.

The line throwing the error is

private var cols: Int {
    UIDevice.current.orientation.isLandscape ? columnsInLandscape : columns
}

in QGrid.swift.

Target is macOS Catalina.

karolkulesza commented 5 years ago

Hi @melgu

Thanks for the feedback. macOS support is done via Mac Catalyst (see: https://developer.apple.com/documentation/uikit/creating_a_mac_version_of_your_ipad_app, https://developer.apple.com/ipad-apps-for-mac/).

In other words, you should create iOS app project and enable the "Mac" checkbox in the project settings.

melgu commented 5 years ago

Thank for the clarification. You should probably mention that in the requirements.