Failed to export to iOS

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

Hi, been having trouble exporting to iOS, but not Android. Exported to Android smoothly.

I’ve tried two methods, as suggested in the documentation from Godot.
Firstly, I tried to export a data.pck and import it into Xcode, the game crashed at launch. The errors logged were:

*********** main.m
running app main
**************** app delegate init
after init super 0x143d0f840
******** screen size 640, 1136
after init gles 0x143d0f840
******** adding observer for sound routing changes
glview is 0x143d0f840
Path: /var/containers/Bundle/Application/A47DD92E-F98D-4984-9C73-86092EA7F337/godot_ios.app
godot_iphone /var/containers/Bundle/Application/A47DD92E-F98D-4984-9C73-86092EA7F337/godot_ios.app/godot_opt.iphone
cwd /private/var/containers/Bundle/Application/A47DD92E-F98D-4984-9C73-86092EA7F337/godot_ios.app
os created
error: Couldn't load game path '.'
Godot Engine v2.1.stable.official (c) 2008-2016 Juan Linietsky, Ariel Manzur.
Usage: /var/containers/Bundle/Application/A47DD92E-F98D-4984-9C73-86092EA7F337/godot_ios.app/godot_opt.iphone [options] [scene]
Options:
	-path [dir] : Path to a game, containing engine.cfg
	-test [test] : Run a test.
		()
	-r WIDTHxHEIGHT	 : Request Window Resolution
	-p XxY	 : Request Window Position
	-f		 : Request Fullscreen
	-mx		 Request Maximized
	-w		 Request Windowed
	-vd DRIVER	 : Video Driver (GLES2)
	-ldpi	 : Force low-dpi mode (OSX Only)	-ad DRIVER	 : Audio Driver (dummy)
	-rthread <mode>	 : Render Thread Mode ('unsafe', 'safe', 'separate).)
	-s,-script [script] : Run a script.
	-d,-debug : Debug (local stdout debugger).
	-rdebug ADDRESS : Remote debug (<ip>:<port> host address).
	-fdelay [msec]: Simulate high CPU load (delay each frame by [msec]).
	-timescale [msec]: Simulate high CPU load (delay each frame by [msec]).
	-bp : breakpoint list as source::line comma separated pairs, no spaces (%20,%2C,etc instead).
	-v : Verbose stdout mode
	-lang [locale]: Use a specific locale
	-rfs <host/ip>[:<port>] : Remote FileSystem.
	-rfs_pass <password> : Password for Remote FileSystem.
setup 31
e[1;31mERROR: alloc_static: e[0me[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true. returned: __null
e[0;31m   At: core/os/memory.cpp:47.e[0m
e[1;31mERROR: resize: e[0me[1mCondition ' !ptr ' is true. returned: ERR_OUT_OF_MEMORY
e[0;31m   At: core/vector.h:284.e[0m
(lldb) 

Next, I tried to import the whole project folder, edit the godot_path to the folder name.
This time, the game successfully started, and stays at Godot splash screen forever.
The log shows:

*********** main.m
running app main
**************** app delegate init
after init super 0x159e06320
******** screen size 640, 1136
after init gles 0x159e06320
******** adding observer for sound routing changes
glview is 0x159e06320
Path: /var/containers/Bundle/Application/906EB1DF-4160-4313-9E13-99CE3D1B3A2F/godot_ios.app
godot_iphone /var/containers/Bundle/Application/906EB1DF-4160-4313-9E13-99CE3D1B3A2F/godot_ios.app/godot_opt.iphone
cwd /private/var/containers/Bundle/Application/906EB1DF-4160-4313-9E13-99CE3D1B3A2F/godot_ios.app
os created
setup 0
cadisaplylink: 1start animation!
******** screen size 640, 1136
******** screen size 640, 1136
setting data dir to /private/var/mobile/Containers/Data/Application/A982AE45-E5B4-44DA-83E1-FEBAF52188FF/Documents from /var/mobile/Containers/Data/Application/A982AE45-E5B4-44DA-83E1-FEBAF52188FF/Documents
GL_APPLE_clip_distance
GL_APPLE_color_buffer_packed_float
GL_APPLE_copy_texture_levels
GL_APPLE_framebuffer_multisample
GL_APPLE_rgb_422
GL_APPLE_sync
GL_APPLE_texture_format_BGRA8888
GL_APPLE_texture_max_level
GL_APPLE_texture_packed_float
GL_EXT_blend_minmax
GL_EXT_color_buffer_half_float
GL_EXT_debug_label
GL_EXT_debug_marker
GL_EXT_discard_framebuffer
GL_EXT_draw_instanced
GL_EXT_instanced_arrays
GL_EXT_map_buffer_range
GL_EXT_occlusion_query_boolean
GL_EXT_pvrtc_sRGB
GL_EXT_read_format_bgra
GL_EXT_sRGB
GL_EXT_separate_shader_objects
GL_EXT_shader_framebuffer_fetch
GL_EXT_shader_texture_lod
GL_EXT_shadow_samplers
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_rg
GL_EXT_texture_storage
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_OES_depth24
GL_OES_depth_texture
GL_OES_depth_texture_cube_map
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_mapbuffer
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_vertex_array_object
S3TC: 0 ATITC: 0
GL_APPLE_clip_distance
GL_APPLE_color_buffer_packed_float
GL_APPLE_copy_texture_levels
GL_APPLE_framebuffer_multisample
GL_APPLE_rgb_422
GL_APPLE_sync
GL_APPLE_texture_format_BGRA8888
GL_APPLE_texture_max_level
GL_APPLE_texture_packed_float
GL_EXT_blend_minmax
GL_EXT_color_buffer_half_float
GL_EXT_debug_label
GL_EXT_debug_marker
GL_EXT_discard_framebuffer
GL_EXT_draw_instanced
GL_EXT_instanced_arrays
GL_EXT_map_buffer_range
GL_EXT_occlusion_query_boolean
GL_EXT_pvrtc_sRGB
GL_EXT_read_format_bgra
GL_EXT_sRGB
GL_EXT_separate_shader_objects
GL_EXT_shader_framebuffer_fetch
GL_EXT_shader_texture_lod
GL_EXT_shadow_samplers
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_rg
GL_EXT_texture_storage
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_OES_depth24
GL_OES_depth_texture
GL_OES_depth_texture_cube_map
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_mapbuffer
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_vertex_array_object
S3TC: 0 ATITC: 0
2016-10-27 12:25:37.321305 godot_opt.iphone[1100:273752] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-10-27 12:25:37.324538 godot_opt.iphone[1100:273752] [MC] Reading from public effective user settings.
e[1;31mERROR: load_source_code: e[0me[1mCondition ' err ' is true. returned: err
e[0;31m   At: modules/gdscript/gd_script.cpp:750.e[0m
e[1;31mERROR: load: e[0me[1mCondition ' err!=OK ' is true. returned: RES()
e[0;31m   At: modules/gdscript/gd_script.cpp:1867.e[0m
e[1;31mERROR: load: e[0me[1mMethod/Function Failed, returning: RES()
e[0;31m   At: core/io/resource_loader.cpp:218.e[0m
e[1;31mERROR: start: e[0me[1mCondition ' res.is_null() ' is true. Continuing..:
e[0;31m   At: main/main.cpp:1412.e[0m
e[1;31mERROR: load_interactive: e[0me[1mCondition ' err!=OK ' is true. returned: Ref<ResourceInteractiveLoader>()
e[0;31m   At: scene/resources/scene_format_text.cpp:947.e[0m
e[1;31mERROR: load: e[0me[1mMethod/Function Failed, returning: RES()
e[0;31m   At: core/io/resource_loader.cpp:218.e[0m
e[1;31mERROR: start: e[0me[1mCondition ' !scene ' is true. returned: false
e[0;31m   At: main/main.cpp:1464.e[0m
********************* did become active

Note that I’m using the latest Xcode 8.
Godot 2.1 stable Mac.
Godot 2.1 stable export templates.
iPhone SE iOS 10.

Thanks.

I think that first error might be caused by the “godot_path” key just existing in your info.plist. I’m not sure though.

I’ve also noticed that when exporting a debug binary to iOS, it takes a while to startup. Exporting release doesn’t take long and when not connecting to lldb starts up pretty quick.

indicainkwell | 2016-11-02 23:03

same problem!
I had tried the first way, and get the same log.
Had anyone resolved it?

Jolie | 2017-05-30 03:57

@Jolie it’s not an answer so I moved it to comment.

volzhs | 2017-05-30 05:49