Search code examples
iosxcodeios5ios6unity-game-engine

Unity3D app crashes after applicationDidBecomeActive() on iOS


Got some problems related to Unity (on mac), iOS 6 and possibly auto-rotation. Updated Unity to 3.5.6f4 as it supposedly had support for better autorotation under iOS 6. But it still crashes when starting the app, however after updating there is no longer any error message.

The app crashed after this log:

  • Completed reload, in 0.229 seconds -> applicationDidBecomeActive()

On a iOS 5 device it does not crash, the log is as follows:

  • Completed reload, in 0.229 seconds -> applicationDidBecomeActive() -> force accelerometer registration ...

So "force accelerometer registration" could perhaps related to autorotation? I should point out that it still crashes on iOS 6 even if autorotation is turned off, earlier version of unity worked!

As a side note, the error I got running Unity 3.5.5 using autorotation on iOS 6 was: "Applications are expected to have a root view controller at the end of application"

Any ideas??


Solution

  • The problem was related to I having missed to connect some gameobjects in unity3d in another scene that was not run in the "simulator" but when starting it on a device.