- Home /
Add fabric plugin cause ios simulator crash [works fine on android, and real iphone]
Hey!
I have very strange problem with fabric plug-in
I created new unity project, added text to it, and the fabric plug-in.
very simple unity project.
when I try to build it to ios, with simulator configuration and run by xcode on simulator I get this:
More detailed:
2017-10-25 06:34:54.996 EmptyFabric2[17324:36785197] -> registered mono modules 0x10f45cf40
2017-10-25 06:34:55.670 EmptyFabric2[17324:36785197] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
-> applicationDidFinishLaunching()
PlayerConnection initialized from /Users/userName/Library/Developer/CoreSimulator/Devices/*******361EBB770FD7/data/Containers/Bundle/Application/******/EmptyFabric2.app/Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55000
Multi-casting "[IP] (someip) [Port] 55000 [Flags] 2 [Guid] 4136895845 [EditorId] 4294967295 [Version] 1048832 [Id] iPhonePlayer(***.local):56000 [Debug] 0" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55000]
Player data archive not found at `/Users/username/Library/Developer/CoreSimulator/Devices-BAE3651FB202/EmptyFabric2.app/Data/data.unity3d`, using local filesystem-> applicationDidBecomeActive()
Renderer: Apple Software Renderer
Vendor: Apple Inc.
Version: OpenGL ES 2.0 APPLE-14.0.15
GLES: 2
GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_depth24 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 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_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage 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_IMG_r
ead_format GL_IMG_texture_compression_pvrtc
OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 220000
Initialize engine version: 5.6.1f1 (2860b30f0b54)
2017-10-25 06:34:57.394122-0400 EmptyFabric2[17324:36785550] [aqme] 254: AQDefaultDevice (1): skipping input stream 0 0 0x0
-------- Shader compilation failed
#version 100
#extension GL_EXT_frag_depth : enable
precision highp float;
uniform highp vec4 _ProjectionParams;
uniform highp vec4 _ZBufferParams;
uniform highp mat4 unity_CameraToWorld;
uniform highp mat4 _NonJitteredVP;
uniform highp mat4 _PreviousVP;
uniform highp sampler2D _CameraDepthTexture;
varying highp vec2 xlv_TEXCOORD0;
varying highp vec3 xlv_TEXCOORD1;
void main ()
{
highp vec4 tmpvar_1;
tmpvar_1 = texture2D (_CameraDepthTexture, xlv_TEXCOORD0);
mediump vec2 tmpvar_2;
highp vec4 tmpvar_3;
tmpvar_3.w = 1.0;
tmpvar_3.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((
(_ZBufferParams.x * tmpvar_1.x)
+ _ZBufferParams.y))));
highp vec4 tmpvar_4;
tmpvar_4 = (unity_CameraToWorld * tmpvar_3);
highp vec4 tmpvar_5;
tmpvar_5 = (_PreviousVP * tmpvar_4);
highp vec4 tmpvar_6;
tmpvar_6 = (_NonJitteredVP * tmpvar_4);
highp vec2 tmpvar_7;
tmpvar_7 = (((tmpvar_5.xy / tmpvar_5.w) + 1.0) / 2.0);
highp vec2 tmpvar_8;
tmpvar_8 = (((tmpvar_6.xy / tmpvar_6.w) + 1.0) / 2.0);
tmpvar_2 = (tmpvar_8 - tmpvar_7);
mediump vec4 tmpvar_9;
tmpvar_9.zw = vec2(0.0, 1.0);
tmpvar_9.xy = tmpvar_2;
gl_FragDepthEXT = tmpvar_1.x;
gl_FragData[0] = tmpvar_9;
}
-------- failed compiling:
fragment evaluation shader
WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'
Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
WARNING: Shader Unsupported: 'Hidden/VR/BlitCopyFromTexArray' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/VR/BlitCopyFromTexArray' - Setting to default shader.
2017-10-25 06:34:59.395496-0400 EmptyFabric2[17324:36785550] [aqme] 254: AQDefaultDevice (170): skipping input stream 0 0 0x0
UnloadTime: 1.025455 ms
dyld: lazy symbol binding failed: Symbol not found: _CLUIsInitialized
Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/BAE3651FB202/EmptyFabric2.app/EmptyFabric2
Expected in: flat namespace
dyld: Symbol not found: _CLUIsInitialized
Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/C69E6449-E817-48A0-A83F-361EBB770FD7/data/Containers/Bundle/Application/C8783D9C-3D95-42D8-93AD-BAE3651FB202/EmptyFabric2.app/EmptyFabric2
Expected in: flat namespace
(lldb)
Before I added the fabric plug-in, my app run on the xcode simulator with no problems!
Important to say that even after adding the fabric plug-in, the app run on android, and on real iphone.
the problem is just after adding the fabric plug-in, and just in xcode simulator!
Unity5.6.1f1 xcode 8.3.3
What could be the problem??
Answer by abhijeet1001 · Nov 07, 2017 at 06:20 AM
Seems like simulator build will crash if you integrate Fabric , workaround is to change activation to manual . Then your app will work in simulator :) . If you want to go back to normal build just change it back to automatic .
I had the same problem, didn't know how to disable it from c# code, even though I removed my initialization code it was trying to init from the cpp code. In the end I had to modify the generated cpp code with a return true call to avoid init logic and it worked. Obviously it was a temporary fix since that is removed once I regenerate the project but it was for a specific test on simulator so it worked for me.