-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add iOS native target #3117
Comments
There is not much planning going on :) A few people wanted Android support, so they opened a few PRs, and now we have Android support. Getting eframe running on iOS should pose no theoretical obstacles - |
@emilk i tried running it with the bevy demo since they are using winit too. I ran into an error with glutin. It complains that no api backend is set. It seems like they support android, but no iOS. That seems to be the only problem when compiling. When using wgpu winit::platform::run_return::EventLoopExtRunReturn is imported which does not exist for iOS. |
I can report that I'm successfully using egui on iOS for my app. I was even able to add basic keyboard support by making some changes to winit as well. @bogeyturn if you want to try my changes you can add the following to your Cargo.toml:
|
@lucasmerlin thats awesome. I tested it originally with bevy’s demo. I used the macro from bevy so I could start it. Could you add a simple example how you got it running. I can’t test it right now and I believe bevy’s stuff will work fine, but a minimal example would be great |
This minimal example works on my iPad: You can also use eframe in the project (I do in my actual project) but the tauri mobile example doesn't use it. Should be easy to switch to eframe though. I might eventually write a sophisticated blog post for my setup to compile my app for iOS, android, wasm, and desktop, but first I want to actually release my app lol |
@lucasmerlin this repo is private. It would be great if you could make it public. |
@bogeyturn sorry, should be public now |
@lucasmerlin that seems to be some boiler plate code. Wouldn’t it be possible to hide that behind a macro like this https://github.com/bevyengine/bevy/blob/main/crates/bevy_derive/src/bevy_main.rs |
I don't actually know fully what the context is on this example but over in iced-rs/iced#631, to get keyboard input (the native OS keyboard), I actually used rust-windowing/winit#2260 is the current state. There's some progress with android, not so much on iOS. Doing so requires getting one's hands dirty with the
Hmm. This sounds like a lack of field missing from the |
Just wondering if anyone got this working? Im thinking of trying some egui for some little mobile apps, but I don't want to get stuck at the first step of getting it to fill the screen. :) |
@zaddok |
Amazing, thank you! |
I just found this thread and worked through it. I was able to get the example in https://github.com/frederik-uni/eframe_template/tree/ios-build-script running on a simulator, but ran into the no keyboard entry issue and black bar. Has any progress been made with the keyboard issue? |
@ptliddle look up into the linked pull requests. has been fixed but not merged/merged but not released |
Also, keyboard support was merged but I don't think there was a winit release since. |
the black bar should be fixed by [patch....] |
Thanks. I managed to fix the black bar but couldn't get the keyboard working. When i tried to use a newer version of winit i get dependency issues. It looks like eframe requires a winit version with the feature "rwh_06". I'll just wait until a new egui version is released and try again. I was just exploring egui as an option for an internal app to run on macOS, Linux and iPhone. I decided to take a different path as it doesn't look like the egui ecosystem is quite there on a supportable level yet. Excited for the possibility in the future though. |
I want to build a mobile app with egui_bevy. Bevy has a mobile version for iOS, but egui does not have it. Is something like this planned or is the only way be wasm and wgpu?
The text was updated successfully, but these errors were encountered: