GLTFSceneKit icon indicating copy to clipboard operation
GLTFSceneKit copied to clipboard

Not Working in ios 12 and xcode 10

Open su-nikunj opened this issue 7 years ago • 5 comments

App crashes on GLTFUnarchiver.swift, line 1036 with a message: "Fatal error: Unexpectedly found nil while unwrapping an Optional value".

An older app built using xcode 9.x was working, but threw the same error when built on xcode 10.

su-nikunj avatar Jun 19 '18 09:06 su-nikunj

I'm seeing this issue running the Mac version of the sample as well.

gltf_xcodebeta10_crash

ThomasJones avatar Jun 21 '18 00:06 ThomasJones

screen shot 2018-06-22 at 3 51 05 pm screen shot 2018-06-22 at 3 50 56 pm

Fixed by making sure all relevant shaders were added to the macOS/iOS projects.

daametsi avatar Jun 22 '18 22:06 daametsi

Are you referring to these?

GLTFShaderModifierSurface_pbrSpecularGlossiness_doubleSidedWorkaround.shader GLTFShaderModifierSurface_pbrSpecularGlossiness_texture_doubleSidedWorkaround.shader GLTFShaderModifierSurface_pbrSpecularGlossiness.shader

And:

GLTFShaderModifierSurface.shader GLTFShaderModifierSurface_alphaModeBlend.shader GLTFShaderModifierSurface_doubleSidedWorkaround.shader GLTFShaderModifierFragment_alphaCutoff.shader

Because I changed the target membership on them and it still doesn't work...

mihaierosx2 avatar Jan 07 '19 10:01 mihaierosx2

It actually works with iOS 12, still no success on macOS Mojave 10.14.12.

mihaierosx2 avatar Jan 07 '19 10:01 mihaierosx2

It works on iOS 12. If you are getting nil errors due to shader its because you aren't properly embedding the framework. If you aren't using a dependency manager you may have missed the build flag that is set. Did you make sure to add the build flags?

SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SEEMS_TO_HAVE_VALIDATE_VERTEX_ATTRIBUTE_BUG SEEMS_TO_HAVE_PNG_LOADING_BUG"

digitallysavvy avatar Nov 23 '19 01:11 digitallysavvy