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

When exporting for iOS, simulator options doesnt appear to run the app #44681

Closed
gumaciel opened this issue Dec 25, 2020 · 21 comments
Closed

When exporting for iOS, simulator options doesnt appear to run the app #44681

gumaciel opened this issue Dec 25, 2020 · 21 comments

Comments

@gumaciel
Copy link
Contributor

Godot version:
3.2.3-stable

OS/device including version:
iMac 27"
XCode: Version 12.3 (12C33)
OS: Catalina 10.15.7 (19H15)

Issue description:
If i export a project in Godot for iOS, the XCode doesn't let me test on Simulator, but when i make a new project in XCode it appears letting me thinking its a issue of Godot
img

Steps to reproduce:
Export the Game normally

Minimal reproduction project:
Can be in any project

@Calinou
Copy link
Member

Calinou commented Dec 25, 2020

I don't remember if official iOS export templates contain simulator binaries (which are x86 instead of ARM).

@akien-mga
Copy link
Member

I don't remember if official iOS export templates contain simulator binaries (which are x86 instead of ARM).

They do: https://github.com/godotengine/godot-build-scripts/blob/master/build-ios/build.sh

@gumaciel
Copy link
Contributor Author

hey @akien-mga , how can i use this script?
it's needed to run this script always when i export a new project?

i think the older versions of Godot you doesn't need to run this script

@gumaciel
Copy link
Contributor Author

Like this video, he was able to run the game on simulator: https://www.youtube.com/watch?v=_huwSZu3XSs&ab_channel=KemoJallow

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

Strange. Just tested on new Macbook with fresh installed Godot and everything works fine.
Снимок экрана 2020-12-26 в 20 26 29

Xcode does filter out simulators that might not be supported by application, so maybe that's the actual source of the problem. Can you try downloading additional simulator runtimes, like iOS 13-14 and add them to the simulator list to check if that's what causes the issue?

@gumaciel
Copy link
Contributor Author

Hey @naithar , i already did that, but didn't make any difference, PS: This is a new project that i tested the export, and have the same problem

image
image
image

@gumaciel
Copy link
Contributor Author

And this is a clean XCode project, as you can see theres options to run on a simulator

Captura de Tela 2020-12-26 às 14 39 13

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

I see... well, I can't really tell what's the problem then.

Can you provide the project that you are trying to export? Maybe there is something wrong with project itself that is causing Xcode to exclude simulator runtimes?

Other than that I really have no idea what could be the cause - as you can see new clean Godot project exports perfectly fine.

@gumaciel
Copy link
Contributor Author

Here is the project: https://www.mediafire.com/file/shumkwsp41ve0yy/admob.zip/file
This project it's on 3.2.4.beta4 version, but i can easily change for 3.2.3 if you want to

I will try to export a clean project and download the simulators on 13.0 version to see how if works,

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

I have simulators available in the list.
Снимок экрана 2020-12-26 в 20 54 08

Well, it actually might be a Xcode caching something that doesn't allow this project on your end to list simulators.
You can try creating new Scheme, if it fixes the issue then it's something in Xcode cache.
You can also try clearing Derived Data folder and restarting Xcode (not sure if restarting Mac is necessary) to clear all cached data.

@gumaciel
Copy link
Contributor Author

Same thing on a clean project
Captura de Tela 2020-12-26 às 14 57 11

Probably it's something about the version of simulator XCode

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

Let me know if clearing cache works, but it seems like a problem that people face with entirely different project according to stackoverflow.

@gumaciel
Copy link
Contributor Author

gumaciel commented Dec 26, 2020

Didn't work, i including restart the XCode and the Computer, but it's with the same problem, currently i'm trying to download the Simulator 13.0, do you know what version of Simulator do you have installed on your computer to me install the same?

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

Both 14.0 and 14.3 simulator runtimes is working fine on my end.

@gumaciel
Copy link
Contributor Author

gumaciel commented Dec 26, 2020

Well, i fixed, but i think this is still a issue of Godot with newest versions of XCode because it shouldn't do that (the SDK 13.0 didn't work as well)

To fix i changed these three datas:

Excluded Architectures -> Debug -> Add: i386
Captura de Tela 2020-12-26 às 18 11 01
Architectures -> Stantard Architectures
Captura de Tela 2020-12-26 às 18 10 12

@naithar can you please how are the these configurations of your XCode?

@naithar
Copy link
Contributor

naithar commented Dec 26, 2020

Well, I have default settings:
Снимок экрана 2020-12-27 в 00 23 46

Also arm7v arch requires your own Godot build as default uses only arm64. And you shouldn't use Build Active Architecture for anything but Debug mode.

@gumaciel
Copy link
Contributor Author

True, i deactivate the Build Active Architecture and works, as i'm developing AdMob for iOS i also needed to add one more Arch to Exclude: arm64, due:
Captura de Tela 2020-12-26 às 18 51 32

Now everything is working.
Captura de Tela 2020-12-26 às 18 40 11

I still don't know why it only appeared to select the Simulator when I changed these settings and basically my computer configuration is the same as yours, I hope that the Godot team will investigate and adjust this.

As I have solved the problem temporarily i will close the issue. Thank you, all of you.

@sandoche
Copy link

I had the same issue I had to do the following to fix it:
image

@lwouis
Copy link

lwouis commented Oct 21, 2021

I faced this issue of not seeing simulators in the list. I updated XCode as suggested by above. However it still didn't run because the .a file doesn't contain i386 arch, so there is no chance it can run. Here's XCode error message:

The linked library 'my-project.a' is missing one or more architectures required by this target: i386.

I think the issue for me is that I was using the godot v3.3.4 with mono. It seems that mono may not support iOS simulator builds, as seen in the source code here: https://github.com/godotengine/godot-build-scripts/blob/bcd0bd19bc223149798955826dd9cde71f476b49/build-ios/build.sh#L107

I tried with the non-mono v3.3.4 build, and it still doesn't work. I'm not sure what I should do to get the .a to contain the i386 arch.

@MikeFrom
Copy link

MikeFrom commented Dec 13, 2021

I've the same problem on an Intel Mac Mini with Godot 3.4.stable. The iOS Simulators don't show up. I can add manualy i386 arm64 to Excluded Architectures, then the iOS Simulators show up, and I can compile, but the build crashes on the Simulator.

Any news/fixes about this Intel iOS Simulator problem? Thanks.

@Calinou
Copy link
Member

Calinou commented Dec 13, 2021

I've the same problem on an Intel Mac Mini with Godot 3.4.stable. The iOS Simulators don't show up. I can add manualy i386 arm64 to Excluded Architectures, then the iOS Simulators show up, and I can compile, but the build crashes on the Simulator.

Any news/fixes about this Intel iOS Simulator problem? Thanks.

Please continue the discussion here: #55902

@godotengine godotengine locked as resolved and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants