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

Fix ios simulator support #12339

Merged
merged 4 commits into from Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Expand Up @@ -318,6 +318,9 @@ embedded_watcher = ["bevy_internal/embedded_watcher"]
# Enable stepping-based debugging of Bevy systems
bevy_debug_stepping = ["bevy_internal/bevy_debug_stepping"]

# Enable support for the ios_simulator by downgrading some rendering capabilities
ios_simulator = ["bevy_internal/ios_simulator"]

[dependencies]
bevy_dylib = { path = "crates/bevy_dylib", version = "0.14.0-dev", default-features = false, optional = true }
bevy_internal = { path = "crates/bevy_internal", version = "0.14.0-dev", default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_internal/Cargo.toml
Expand Up @@ -163,6 +163,9 @@ bevy_debug_stepping = [
"bevy_app/bevy_debug_stepping",
]

# Enable support for the ios_simulator by downgrading some rendering capabilities
ios_simulator = ["bevy_pbr?/ios_simulator", "bevy_render?/ios_simulator"]

[dependencies]
# bevy
bevy_a11y = { path = "../bevy_a11y", version = "0.14.0-dev" }
Expand Down
1 change: 1 addition & 0 deletions docs/cargo_features.md
Expand Up @@ -61,6 +61,7 @@ The default feature set enables most of the expected features of a game engine,
|file_watcher|Enables watching the filesystem for Bevy Asset hot-reloading|
|flac|FLAC audio format support|
|glam_assert|Enable assertions to check the validity of parameters passed to glam|
|ios_simulator|Enable support for the ios_simulator by downgrading some rendering capabilities|
|jpeg|JPEG image format support|
|minimp3|MP3 audio format support (through minimp3)|
|mp3|MP3 audio format support|
Expand Down
4 changes: 2 additions & 2 deletions examples/mobile/.cargo/config.toml
@@ -1,5 +1,5 @@
# Flag to notify the compiler we're building for the iOS simulator from an Apple silicon mac
# This needs some workarounds for now
# See https://github.com/bevyengine/bevy/pull/10178 - remove if it's not needed anymore.
[target.aarch64-apple-ios-sim]
features = ["bevy_render/ios_simulator"]
[target.aarch64-apple-ios-sim.features]
["ios_simulator"]
3 changes: 3 additions & 0 deletions examples/mobile/Cargo.toml
Expand Up @@ -13,6 +13,9 @@ crate-type = ["staticlib", "cdylib"]
[dependencies]
bevy = { path = "../../" }

[target.aarch64-apple-ios-sim.dependencies]
bevy = { path = "../../", features = ["ios_simulator"] }

[package.metadata.android]
package = "org.bevyengine.example"
apk_name = "bevyexample"
Expand Down