Compiling for IOS document's commands not working.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kayaocal
:warning: Old Version Published before Godot 3 was released.

Hello everybody. I just want to test my game on Iphone simulator.

I’m following all the steps on “Compiling for IOS” page on documentations, but I wasn’t succeed yet.

I have Xcode(7) installed with command line tools and also sCons.

    scons p=isim bin/
    scons p=iphone bin/godot.iphone.debug

I get same error with both of commands above. I also tried these commands with sudo
and the error is below…

scons: Reading SConscript files ...
No valid target platform selected.
The following were detected:

Please run scons again with argument: platform=<string>
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Do not know how to make File target `bin/'(godot-master/bin/  Stop.
scons: building terminated because of errors.

but somehow when i run command below, it just compiled.

scons p=iphone

and name of compiled file was godot.iphone.debug.arm

I just don’t know what to do. Please help me. Have a good day.

:bust_in_silhouette: Reply From: vnen

The documentation is outdated in this regard. p=isim is not valid anymore. You also shouldn’t add the binary name in the command.

Building for iPhone should be like this:

# For debug build:
scons p=iphone target=release_debug
# For release build
scons p=iphone target=release

If you want to build for x86 (the simulator):

# For debug build:
scons p=iphone target=release_debug ios_sim=yes
# For release build
scons p=iphone target=release ios_sim=yes

ios_sim=yes can also be replaced by arch=x86.

Thanks alot! It works perfectly.

Kayaocal | 2016-08-30 13:06

But is possible to compile for simulator with 64 bits architecture?
Thanks in advance.

jospic | 2017-08-02 08:03