Skip to content

Importing Pow conditionally on iOS 14 #25

@frogg

Description

@frogg

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions