Community

Topic: Unity 3D Plugin

Unity package for iOS is not working (SOLVED)

tkordac
Thursday, January 5, 2017

I tried to run demo app on iOS. The app runs in Unity 5.4.3 editor. I compiled it according to your tutorial. The app didn't launch on iOS device version 10.2. I get the error message from Xcode "shader is not supported" when I use GLES 2. I get no error message when i use Metal, but the app still does not launch.

Thank you

user profile image
Support Team  (expert)
Monday, January 9, 2017

I'm unable to reproduce your problem, i need additional information:
-did you import the sdk package in an empty project?
-which OS are you using?
-for which platform are you building the project? (remember you still need to switch platform to iOS or Android even
if you just want to debug the scene in the editor on your PC with a webcam)
-are you using other 3rd party plugins in your unity project?
-which version of the unity editor are you using?

tkordac
Monday, January 9, 2017

It is empty project, no third party plugins. I have MacOS Sierrra. Unity editor 5.4.3. I switched the platform to iOS and I configured it according to your tutorial. I tried the same with Android today. The same issue.

user profile image
Support Team  (expert)
Monday, January 9, 2017

Sometimes Unity forget to set the correct privacy key description that are required by the latest iOS/xCode, try enabling and setting this on your app plist:

<key>NSCameraUsageDescription</key>

<string>This app requires access to the camera!</string>


Could you please post the log?

tkordac
Monday, January 9, 2017

I set the CameraUsageDescription parameter. This is not the issue. I know this parameter. What PlayerSettings can I use for log? I get the unsupported shader error with GLES2 setting. No error with Auto (Metal) settings.

user profile image
Support Team  (expert)
Monday, January 9, 2017

Could you post the console log of your app using OpenGLES2 and setting full log on error, warning and exceptions in the log settings?
It's a strange error that i'm currently unable to replicate on our 10.2 testing devices (using both 5.4.1 and 5.5 versions of Unity)
Best,

tkordac
Monday, January 9, 2017

2017-01-09 14:42:25.631201 test[1601:862698] [DYMTLInitPlatform] platform initialization successful

2017-01-09 14:42:25.715977 test[1601:862578] -> registered mono modules 0x100f09c50
2017-01-09 14:42:25.876157 test[1601:862578] You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
-> applicationDidFinishLaunching()
-> applicationDidBecomeActive()
Renderer: Apple A8X GPU
Vendor: Apple Inc.
Version: OpenGL ES 2.0 Apple A8X GPU - 95.16
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 ; Context handle 1946329280
2017-01-09 14:42:26.313357 test[1601:862578] NatCam: Registered for Native Rendering
Initialize engine version: 5.4.3f1 (01f4c123905a)
-------- 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.
UnloadTime: 1.351875 ms
2017-01-09 14:42:27.454141 test[1601:862578] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-01-09 14:42:27.454730 test[1601:862578] [MC] Reading from public effective user settings.
2017-01-09 14:42:27.464494 test[1601:862578] NatCam: Inspected Device: Found 2 cameras
2017-01-09 14:42:27.728903 test[1601:862578] NatCam Native: Registered Callbacks
2017-01-09 14:42:27.729083 test[1601:862578] NatCam: Inspected Device: Found 2 cameras
Setting up 1 worker threads for Enlighten.
Thread -> id: 16f5d3000 -> priority: 1

user profile image
Support Team  (expert)
Monday, January 9, 2017

Ok, from the log it could be a Unity bug with the shader creation (see http://stackoverflow.com/questions/40283628/unity-application-crashes-at-ios-due-to-shader-not-compiled),
try this :
Open Unity -> Edit -> Project settings -> Graphics
Then see Depth Normals under built-in shader setting and Choose option no Support

user profile image
Support Team  (expert)
Tuesday, January 10, 2017

Are you using com.pikkart.trial as Bundle Identifier of your app?

Apps using the trial version of the SDK must use that identifier.

tkordac
Tuesday, January 10, 2017

Yes, the bundle name was the problem. Thank you

Sign in to add a comment