Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share extension support #735

Open
alexatgetcalvinapp opened this issue Feb 11, 2025 · 1 comment
Open

Share extension support #735

alexatgetcalvinapp opened this issue Feb 11, 2025 · 1 comment
Labels
kind/support Adopter support requests. status/triage Collecting information required to triage the issue.

Comments

@alexatgetcalvinapp
Copy link

Question

I'm trying to access the generator swift package inside a Share Extension.

Image

I get this error when building: _OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.

Please let me know what I'm doing wrong or how to get access to the generator. Thank you.

@alexatgetcalvinapp alexatgetcalvinapp added kind/support Adopter support requests. status/triage Collecting information required to triage the issue. labels Feb 11, 2025
@czechboy0
Copy link
Contributor

Hi @alexatgetcalvinapp,

it looks like you're trying to link the generator (a build tool) into your application/share extension, but you should only link the runtime library.

You should be able to fix it by first removing the generator from your share extension, and then following this tutorial: https://swiftpackageindex.com/apple/swift-openapi-generator/1.7.0/tutorials/swift-openapi-generator/clientxcode - be especially careful about which products should be linked into your target (runtime, transport), and which shouldn't (generator).

If it still doesn't work then, let us know 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Adopter support requests. status/triage Collecting information required to triage the issue.
Projects
None yet
Development

No branches or pull requests

2 participants