Skip to content

Swift Package usage: Unable to build iOS targets #124

Closed
@yanniks

Description

@yanniks

Hi,

we are currently trying to migrate to this OpenAPI generator plugin. However, we noticed that builds of our Swift Package are no longer possible if the plugin is added to the target and an iOS Simulator is selected as target environment.

The following snippet is used to declare the target in the Package.swift file:

.target(
    name: "MyOAPIExample",
    dependencies: [
        .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
        "MyNetworkingLibrary",
    ],
    plugins: [
        .plugin(
            name: "OpenAPIGenerator",
            package: "swift-openapi-generator"
        ),
    ]
),

As soon as the plugin is added to the target, the build fails with the following issue:

error: The package product 'OpenAPIGenerator' requires minimum platform version 99.0 for the iOS platform, but this target supports 15.0 (in target 'MyOAPIExample' from project 'MyNetworking')

Builds who target macOS work fine. Is there any workaround that enables iOS builds?

Thanks & best regards,
Yannik

Metadata

Metadata

Assignees

Labels

area/generatorAffects: plugin, CLI, config file.kind/bugFeature doesn't work as expected.size/SSmall task. (A couple of hours of work.)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions