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

Support for adding multiple swift-bridge packages #303

Open
annethereshewent opened this issue Nov 28, 2024 · 4 comments
Open

Support for adding multiple swift-bridge packages #303

annethereshewent opened this issue Nov 28, 2024 · 4 comments

Comments

@annethereshewent
Copy link

Hello, is there a way to add multiple swift-bridge packages to an Xcode project? If I try to add an additional package using this method https://chinedufn.github.io/swift-bridge/building/swift-packages/index.html, I get an error from Xcode saying that there are conflicts. Here is a screenshot:

conflict

Is there a workaround to this? Thank you!

@annethereshewent
Copy link
Author

So the workaround for this, per the error, was to rename RustXcframework in the second module to RustXcframework2. This seems to work ok as a hack for now.

@annethereshewent
Copy link
Author

Sorry to bother, but reopening this because I'm unable to compile the project. I get the errors:

Multiple commands produce '...../Build/Products/Debug-iphoneos/include/SwiftBridgeCore.h'

Multiple commands produce '...../Build/Products/Debug-iphoneos/include/module.modulemap'

Not sure how to get around this.

@NiwakaDev
Copy link
Collaborator

@annethereshewent

Could you share a minimal example to be able to reproduce the error?

@annethereshewent
Copy link
Author

Hey there, I was able to get around this by moving some files around. I'm not sure this is a bug but more of a limitation of how you import modules into swift. I used the how-to in the readme of this repo to get around the issue for now. https://github.com/jessegrosjean/swift-cargo-problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants