Crates.io | bevy_ios_alerts |
lib.rs | bevy_ios_alerts |
version | |
source | src |
created_at | 2024-04-17 11:05:16.45667 |
updated_at | 2024-12-02 20:03:52.562401 |
description | Bevy plugin to request ios native UIAlert popups |
homepage | |
repository | https://github.com/rustunit/bevy_ios_alerts |
max_upload_size | |
id | 1211330 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Rust crate and Swift package to easily integrate iOS's native UIAlerts API into a Bevy application.
demo from our game using this crate: zoolitaire.com
See also bevy_ios_iap, bevy_ios_notifications, bevy_ios_gamecenter, bevy_ios_review & bevy_ios_impact
Go to File
-> Add Package Dependencies
and paste https://github.com/rustunit/bevy_ios_alerts.git
into the search bar on the top right:
cargo add bevy_ios_alerts
or
bevy_ios_alerts = { version = "0.2" }
Initialize Bevy Plugin:
app.add_plugins(bevy_ios_alerts::IosAlertsPlugin);
Trigger Alert in your application code:
fn system_triggerin_alerts(mut events: EventWriter<IosAlert>) {
events.send(IosAlert::Message {
title: String::from("title"),
msg: String::from("msg"),
button: String::from("ok"),
});
events.send(IosAlert::Dialog {
title: String::from("title"),
msg: String::from("this is a dialog with multiple buttons"),
button_yes: String::from("absolutely yes"),
button_no: String::from("no no no"),
});
events.send(IosAlert::Input {
title: String::from("title"),
msg: String::from("input box"),
button: String::from("ok"),
placeholder: String::from("placeholder"),
});
}
fn process_alert_response(mut events: EventReader<IosAlertResponse>) {
for e in events.read() {
info!("incoming alert response: {e:?}");
}
}
bevy | bevy_ios_alerts |
---|---|
0.14 | 0.3,main |
0.14 | 0.2 |
0.13 | 0.1 |
All code in this repository is dual-licensed under either:
at your option. This means you can select the license you prefer.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.