Skip to content

Commit 0b1d88f

Browse files
authored
Merge pull request #133 from extrawurst/fix-ios-building
fix building on iOS
2 parents d1979e6 + 8a864ba commit 0b1d88f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

mobile/mobile.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
57CD6306253C7A940098CD4A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57CD6305253C7A940098CD4A /* AudioToolbox.framework */; };
1818
57CD630E253C80EC0098CD4A /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 57CD630A253C7F5F0098CD4A /* assets */; };
1919
6ADF1AB92CCDA73A00AF5F8E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ADF1AB82CCDA73A00AF5F8E /* QuartzCore.framework */; };
20+
D4A53EFF2DDD2FF70035BC01 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A53EFE2DDD2FF70035BC01 /* AVFoundation.framework */; };
2021
/* End PBXBuildFile section */
2122

2223
/* Begin PBXContainerItemProxy section */
@@ -42,6 +43,7 @@
4243
9F1B41978FA53999AA836D0F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
4344
A39528EB2CCB182F5328223A /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
4445
AF7DE91055EBD05ED77E57F9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
46+
D4A53EFE2DDD2FF70035BC01 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
4547
FE71FBCAA714DB4F42459106 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
4648
/* End PBXFileReference section */
4749

@@ -55,6 +57,7 @@
5557
134866208A035F8615C99114 /* Metal.framework in Frameworks */,
5658
2604C99FAB5A8322EDCABB9F /* UIKit.framework in Frameworks */,
5759
55B7188F81C3C4183F81D3AE /* libc++.tbd in Frameworks */,
60+
D4A53EFF2DDD2FF70035BC01 /* AVFoundation.framework in Frameworks */,
5861
57CD6306253C7A940098CD4A /* AudioToolbox.framework in Frameworks */,
5962
);
6063
runOnlyForDeploymentPostprocessing = 0;
@@ -95,6 +98,7 @@
9598
EB028409C2D0655412DA6E44 /* Frameworks */ = {
9699
isa = PBXGroup;
97100
children = (
101+
D4A53EFE2DDD2FF70035BC01 /* AVFoundation.framework */,
98102
6ADF1AB82CCDA73A00AF5F8E /* QuartzCore.framework */,
99103
57CD6305253C7A940098CD4A /* AudioToolbox.framework */,
100104
A39528EB2CCB182F5328223A /* libc++.tbd */,

mobile/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ use bevy::window::WindowMode;
33
use bevy::winit::WinitSettings;
44
use bevy_game::GamePlugin; // ToDo: Replace bevy_game with your new crate name.
55

6+
#[unsafe(no_mangle)]
7+
unsafe extern "C" fn main_rs() {
8+
main();
9+
}
10+
11+
// this macro is a no-op on ios and only needed for anroid since bevy 0.16
12+
// see https://github.com/bevyengine/bevy/pull/14780
613
#[bevy_main]
714
fn main() {
815
#[cfg(target_os = "ios")]

0 commit comments

Comments
 (0)