Run some objc code very early in unity iOS game lifetime

| | August 4, 2015

I want to hook up a crash reporting service to my unity iOS game. It’s just one line of objC to add, as early into the app lifecycle as possible, but I’m not sure how to get it to run. I know I could make a native plugin and then call that from some Awake() function in C#, but that’s too late for my purposes.

I’m not a native iOS developer, but I know enough to be dangerous. I have been able to google enough that I know I want something to with UnityAppController, probably preStartUnity(). But that’s all.

Has anyone got further resources on how to do this? Or another way, if I’m barking up the wrong tree?

edit: I’m on unity 4.6.

One Response to “Run some objc code very early in unity iOS game lifetime”

  1. This may be a blatant hack, but Unity now let’s you use a custom xib for the splash/loading screen. Maybe you can attach it there.

    Edit: I forgot, this feature is Pro only.

Leave a Reply