This app is a working example running Bevy and Vulkano on iOS.
The app bundle has been generated using cargo-mobile. MoltenVK
framework from VulkanSDK has been added using xcode.
- Install cargo-mobile and make sure you have xcode installed
- Run
cargo mobile init
- Open project in xcode
open gen/apple/bevy-vulkano-ios.xcodeproj
- Make sure your development team is selected in Signing & Capabilities. You will need an apple development account.
- For this project, link
MoltenVK.xcframework
. This is necessary forVulkano
to work. Your SDK install might be found somewhere like~/VulkanSDK/1.3.216.0/MoltenVK/MoltenVK.xcframework
, You can do this in XCode -> General -> Frameworks, Libraries, and Embedded Content - Attach your mobile device via cord to your mac
- Run
cargo apple run
. Keep your mobile device unlocked.
After installing cargo-mobile
and cargo-mobile-init
, just run cargo run
.
- If you get an error
error: the use of xcframeworks is not supported in the legacy build system.
, modify your xcode project build settings in File -> Project Settings -> Build System: Select New Build System. - Also, debugging won't work unless your xcode supports the same iOS version which your device is running.
- Winit does not have the screen flip events, thus it might be better to disable them in xcode for the project in General -> Deployment Info -> Device Orientation
Result: