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

Exported XCode project won't build #82454

Closed
asrytis opened this issue Sep 27, 2023 · 9 comments · Fixed by #82458
Closed

Exported XCode project won't build #82454

asrytis opened this issue Sep 27, 2023 · 9 comments · Fixed by #82458

Comments

@asrytis
Copy link

asrytis commented Sep 27, 2023

Godot version

v4.1.1.stable.official [bd6af8e]

System information

Godot v4.1.1.stable - macOS 13.5.2 - Vulkan (Mobile) - integrated Apple M2 Max - Apple M2 Max (12 Threads)

Issue description

Generated XCode project fails immediately after trying to run:

Undefined symbols:
Linker command failed with exit code 1 (use -v to see invocation)

XCode: Version 15.0 (15A240d)

Screenshot 2023-09-27 at 20 29 28

Steps to reproduce

  1. Create a new Godot project with an empty 2d scene.
  2. Export to iOS

Open the generated project in XCode. Select some simulator eg. iPhone 15 Pro & hit run.

Minimal reproduction project

problemdemo.zip

@bruvzg
Copy link
Member

bruvzg commented Sep 28, 2023

There are two issues here:

  • Xcode 15 new linker having issues with ray cast module and missing iOS 11.0 SDK (should be fixed by [iOS] Fix build with Xcode 15. #82458).
  • Official export templates do not include iOS simulator libraries for Apple Silicon (known issue, currently it's not buildable using OSXCross), only device and Intel simulator libs are included.

@asrytis
Copy link
Author

asrytis commented Sep 29, 2023

I can confirm it works on my iPhone. Simulator support would still be great but at least I can run it on my device.

@asrytis asrytis closed this as completed Sep 29, 2023
@henboffman
Copy link

I can confirm it works on my iPhone. Simulator support would still be great but at least I can run it on my device.

What did you do to fix it? Simply pull down that linked pull request?

@bruvzg
Copy link
Member

bruvzg commented Sep 29, 2023

What did you do to fix it? Simply pull down that linked pull request?

You will need to build a custom export template with the changes from this PR, see https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_ios.html

Simulator support would still be great but at least I can run it on my device.

On Apple Silicon macs, you can select "This Mac" from the Xcode target menu and run the device app directly on the mac. Or you can build a custom export template with the simulator lib (it is not buildable only when cross-building from Linux, building on macOS it is supported).

@henboffman
Copy link

What did you do to fix it? Simply pull down that linked pull request?

You will need to build a custom export template with the changes from this PR, see https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_ios.html

Simulator support would still be great but at least I can run it on my device.

On Apple Silicon macs, you can select "This Mac" from the Xcode target menu and run the device app directly on the mac. Or you can build a custom export template with the simulator lib (it is not buildable only when cross-building from Linux, building on macOS it is supported).

Thank you for the reply. I'm new to Godot and just to the point where I wanted to build a version out for testflight to test, but hit a wall getting it to run even in xcode on my device. Do your instructions regarding the simulator library apply for a build that I'd send up to testflight? I'd think they do, but figured I'd ask. Again, thank you for replying. The relief of finding this post and it being recent made my day

@asrytis
Copy link
Author

asrytis commented Sep 30, 2023

What did you do to fix it? Simply pull down that linked pull request?

No I just changed the run destination from simulator to my iPhone and set the minimum iOS version to 16. I haven't experimented with other iOS versions, maybe it works with the default too (11).

@akien-mga akien-mga added this to the 4.2 milestone Sep 30, 2023
@akien-mga
Copy link
Member

Reopening as the fix is not merged yet.

@aleksfadini
Copy link

I had the same issue. I know this is closed, but finding this page really helps since the current LTS version of Godot presents the same behavior, which looks like the export process failed (although it's just the simulator). Would be nice to have a note about it in the docs.

@PseudoC0de
Copy link

This issue is still present in Godot 3.5.3 iOS exports.

  • Godot version: 3.5.3
  • Operating System: MacOS Sonoma 14.2.1
  • Xcode version: 15.2
  • Apple Silicon M2

Since MacOS Sonoma requires the use of Xcode 15, can a similar solution as #82458 be used to apply a fix in 3.5.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants