Pow icon indicating copy to clipboard operation
Pow copied to clipboard

Importing Pow conditionally on iOS 14

Open frogg opened this issue 1 year ago • 7 comments

I would like to use Pow in a Swift Package supporting iOS 14:

platforms: [
        .iOS(.v14)
],

I’ve tried to include the package using the condition parameter:

dependencies: [
    .product(name: "Pow", package: "Pow", condition: .when(platforms: [.iOS(.v15), .macCatalyst]))
]

But somehow that doesn't work, Xcode is complaining like so:

image

Of course I’ll have to put these if #available(iOS 15.0, *) flags every time I use Pow code.

Any idea how to achieve this?

frogg avatar Mar 30 '23 16:03 frogg