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

arboard fails to build for android target (and probably iOS) #198

Closed
jsclary opened this issue Aug 3, 2023 · 2 comments · Fixed by #241
Closed

arboard fails to build for android target (and probably iOS) #198

jsclary opened this issue Aug 3, 2023 · 2 comments · Fixed by #241

Comments

@jsclary
Copy link

jsclary commented Aug 3, 2023

Obviously, if bevy_egui is a direct dependency, you can work around this with:

[dependencies]
bevy_egui = { version = "0.21.0", default-features = false, features = ["open_url", "default_fonts"] }

However, if you are targeting multiple platforms, it gets more complicated:

[target.'cfg(target_os = "android")'.dependencies]
bevy_egui = { version = "0.21.0", default-features = false, features = ["open_url", "default_fonts"] }

[target.'cfg(not(target_os = "android"))'.dependencies]
bevy_egui = { version = "0.21.0"  }

And, if it happens to be a dependency of third party plugins you use (such as bevy_console) and isn't feature-controlled there, I think you are just out of luck unless you're prepared to fork all of those projects.

Given that there's already an explicit exclusion for wasm, it seems reasonable to extend it to something like:

[target.'cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))'.dependencies]
arboard = { version = "3.2.0", optional = true }
thread_local = { version = "1.1.0", optional = true }

I would guess the same is true of iOS so I stuck that condition in as well but I don't have a Mac to test with and I haven't forked bevy_egui so that last block is entirely untested.

Though, really, it'd be nice to have clipboard support on Android (and iOS) at some point. It's not something I have the time or expertise to take on at the moment but maybe in the future.

@maaku
Copy link

maaku commented Oct 8, 2023

Just ran into this problem, and thanks for the fix. The problem does not seem to exist on iOS however! At least cargo check --target aarch64-apple-ios running on my Mac seems to work just fine. Only my android targets were failing.

@extrawurst
Copy link

We should have ci for escential plugins on the major platforms

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

Successfully merging a pull request may close this issue.

3 participants