Q-Mobile / QGrid

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

Error when importing QGrid in project with lower deployment target #44

Closed rivera-ernesto closed 4 years ago

rivera-ernesto commented 4 years ago

I am trying to use QGrid on my iOS 10+ app with no luck.

Compiling for iOS 10.0, but module 'QGrid' has a minimum deployment target of iOS 13.0

I would like to import it and use it conditionally just like import SwiftUI does. Any ideas?

Thank you

karolkulesza commented 4 years ago

You can easily achieve that just by:

  1. Changing .iOS(.v13) to .iOS(.v10) in QGrid’s Package.swift
  2. Marking all the structs utilising QGrid with: @available(iOS 13.0, *) attribute

Hope that helps!

Best, Karol

rivera-ernesto commented 3 years ago

I see, thank you. Wondering what are the best (or "less bad") practices in this case.

rivera-ernesto commented 3 years ago

Would it make sense to add @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) where needed to ease manually adding the code to a project with a lower deployment target?