Having upgraded the Facebook SDK to 7.1.0 having followed the upgrade guide, it all builds and runs fine in the editor. Although the Editor version doesn’t simulate the modal display of the SafariViewController.
Guide:
I’ve been able to set the Facebook SDK example scene as my main scene, build and run on an iOS device and have it all run fine and login without issue.
My issue is with my implementation. When I build and run on an iOS device, the new Facebook SDK uses the SafariViewController and popups a login window. I enter my login details and login, then I see the permission screen and hit ok. This is the point of failure, and the error message suggests an issue with nested iteration.
So my question is what has changed in the Facebook SDK that could cause this? Could this be an issue with the SDK? It seems unlikely as the example runs fine. However I didn’t experience this issue with the previous SDK.
I’m left a little stumped on this one. Any help would be appreciated. I’ve attached screenshots and dumped the console error log on pastebin Facebook Unity SDK 7.1.0 Crash - Pastebin.com
I ran into the same issue. If you go into UnityAppController+ViewHandling.mm in xcode, you should find the createSnapshotView , returning nil will stop the crash, but i am not sure what side effects it will have. The weird thing is that If i am not using ADBannerView then it won’t crash, is that the case for you?
I have filed a bug to Unity, will wait and see what they say.
Returning nil will make the problem go away, but I talked with Unity support and a robust fix was made in Unity 5.3.4p3.
Case 775710:
The case description doesn’t really reflect the issue we were seeing, but they are now guarding the call to createSnapshotView such that the view hierarchy shouldn’t be modified during iteration.
Also, for reference the symbolicated crash stack is like this:
Our crashes were occurring when users would background the app during the startup sequence. Reason being that removing the splash screen and showing our game UI would change the view hierarchy.
Another variant of this issue was fixed in Unity 5.3.2.p4 with case 760747. The repro for that was to have the onscreen keyboard open when the app is backgrounded.