bevy/examples/mobile
Mads Marquart 94deca81bf
Use target_abi = "sim" instead of ios_simulator feature (#17702)
## Objective

Get rid of a redundant Cargo feature flag.

## Solution

Use the built-in `target_abi = "sim"` instead of a custom Cargo feature
flag, which is set for the iOS (and visionOS and tvOS) simulator. This
has been stable since Rust 1.78.

In the future, some of this may become redundant if Wgpu implements
proper supper for the iOS Simulator:
https://github.com/gfx-rs/wgpu/issues/7057

CC @mockersf who implemented [the original
fix](https://github.com/bevyengine/bevy/pull/10178).

## Testing

- Open mobile example in Xcode.
- Launch the simulator.
- See that no errors are emitted.
- Remove the code cfg-guarded behind `target_abi = "sim"`.
- See that an error now happens.

(I haven't actually performed these steps on the latest `main`, because
I'm hitting an unrelated error (EDIT: It was
https://github.com/bevyengine/bevy/pull/17637). But tested it on
0.15.0).

---

## Migration Guide

> If you're using a project that builds upon the mobile example, remove
the `ios_simulator` feature from your `Cargo.toml` (Bevy now handles
this internally).
2025-02-11 23:01:26 +00:00
..
android_basic Use target_abi = "sim" instead of ios_simulator feature (#17702) 2025-02-11 23:01:26 +00:00
android_example Add features to switch NativeActivity and GameActivity usage (#12095) 2024-10-01 22:23:48 +00:00
android_example_native Add features to switch NativeActivity and GameActivity usage (#12095) 2024-10-01 22:23:48 +00:00
bevy_mobile_example.xcodeproj Upgrade to wgpu 23 (#15988) 2024-11-05 21:18:48 +00:00
ios-src IOS, Android... same thing (#7493) 2023-02-06 18:08:49 +00:00
src Run handle_lifetime only when AudioSink is added to the world (#17637) 2025-02-02 00:07:02 +00:00
.gitignore Add features to switch NativeActivity and GameActivity usage (#12095) 2024-10-01 22:23:48 +00:00
build_rust_deps.sh Fix alignment on ios simulator (#10178) 2023-10-21 22:19:46 +00:00
Cargo.toml Use target_abi = "sim" instead of ios_simulator feature (#17702) 2025-02-11 23:01:26 +00:00
Makefile Improve selection of iOS device in mobile example (#9282) 2023-10-08 20:57:41 +00:00