gfx device intialization failed and crash on iOS since Unity 5.5.0f03
After the applicationDidBecomeActive() method on iOS, I'm experiencing a crash that happens right when the app starts up. The log that is outputted is: "gfx device intialization failed", which I can not find anywhere if I research the issue.
1) App builds fine, all the way to running 2) When it runs, the splash screen shows 3) When the applicationDidBecomeActive() is called, it prints gfx device intialization failed and crashes without a log.
I have made a built on 5.5.0f02 fine, and am unable to downgrade.
Does anyone have suggestions on where this message may come from. Is it a unity message, or not, and how I should go about researching the cause? I do not have any experimental/different options toggled in the player.
Answer by GuyTidhar · Dec 11, 2016 at 05:47 PM
Try removing the "Metal" support for the time being, as it seems Unity has a bug regarding it.
You do it in the Player Settings of iOS, by switching off the "Auto Graphics API" and and removing (- sign) the Metal, keeping only the OpenGLES2 which is the older gfx API.
By doing that I avoid getting this until Unity fixes their issue.
This answer worked for me - because I don't have Firebase plugin exist into my project. To be more clear - here you find this option:
Hi, I am using AR$$anonymous$$it too and if I remove metal then the code won't work Any suggestions on this?
Just encountered this issue using Unity 2018.4.14f1, replacing $$anonymous$$etal with OpenGLES2 or OpenGLES3 worked for us.
Answer by The_Arrival · Nov 05, 2019 at 10:24 AM
Using Unity 2019.3 the issue still remains. The AutoGraphicsAPI flag is checked and i´m building fo simulator, so i´d expect it to resolve the correct API automatically :)
I am having the same issue Unity 2019.3.7 - The think is i'm using Linear Color space and that requires $$anonymous$$etal graphics api. cannot revert to OpenGLS
Answer by getwreckedgame · Dec 11, 2016 at 12:46 AM
Found the issue. It is caused by the Firebase 1.1.0 update.
Comment line 51 in MessagingDeps.cs: // Google.VersionHandler.InvokeStaticMethod(iosResolver, "AddPod", new object[] { "Firebase/Messaging" }, new Dictionary () { { "version", "3.10+" }, { "minTargetSdk", "7.0" } });
And delete the "libMessaging.a" file in the iOS directory.
This one saved me with crash issue. The engine version was 5.3.6 f1 for my case. Just removing lib$$anonymous$$essaging.a without modifying $$anonymous$$essagingDeps.cs was enough though. I wonder how you found out this workaround. Anyway I asked Google for this issue cause I don't think Firebase $$anonymous$$essaging feature would work without lib$$anonymous$$essaging.a included. Cheers.
No - it has nothing to do with Firebase. We don't even use it (the SD$$anonymous$$ was never integrated in our code).
GuyTidhar - Gfx device init failure should do with the GL settings most of the case. disabling GPU Frame capture from Xcode's Product - Scheme - Edit Scheme or following your answer's step would solve the issue but It was due to Firebase for $$anonymous$$e and getwreckedgame's case obviously :)
Answer by hernanb · Aug 18, 2017 at 12:49 PM
I have the same problem, I embebed unity inside ios , and on ios i have installed firebase pods. The problem is i cant start my app. When the applicationDidBecomeActive() is called gfx device initialization failed.
then i cant find libmessaging.a or MessagingDeps.cs that i supouse there are files from unity firebase integration.
I try the OpenGles2 solution but this not was the problem. then i disabled from edit scheme de gpu frame capture, but it steel generate the same error.
Unity 2017.1.0p2 and xcode 8.3.3
thanks for your help!
so.. did you find solution? In my case I have the same problem - that starting app from xcode stop with this err. But it actually works with starting app from the device.
Answer by leoapp · Oct 24, 2020 at 04:40 AM
Solved it by unchecking Metal API Validation flag in Edit Scheme -> Run -> Diagnostics in Xcode. Using Unity 2020.1.9f1.
Your answer
Follow this Question
Related Questions
IL2CPP Build error Unity 5.3.1p4 0 Answers
Connecting Unity 5.3.0 Debugger to iOS device 1 Answer
Share Image Android / iOS 1 Answer
[Not Answered] Fog not working iOS Build 2 Answers