Does iOS save the debug.log on the device ?
if so, where ?
You can connect your device to the computer, open XCode and open Organizer window. Select devices and then select your device, “Console” item. There you should have debug.log output (at least that’s where I find it) and you can export it from there if you need it.
In Unity 4, Debug.Log() output is shown in the XCode’s debug Console. Notice that this is NOT the Console in the Organizer, which shows the device events, but it’s the Console that is shown at the bottom of the main window, which is called Debug area. The Organizer’s Device Logs is useful to obtain the crash logs when the app is executing out of XCode.
You add a log callback and display the logs on the screen or send it to your server. The log callback function changed from Unity 5 on:
void Start()
{
#if UNITY_5_OR_NEWER
Application.logMessageReceived += handleLog;
#else
Application.RegisterLogCallback(handleLog);
#endif
}
//your delegate should have this signature
void handleLog(string logString, string stackTrace, LogType type)
You can also use Reproter to receive crash logs as an email.
I sell a debug tool on the Asset Store that gives you the output of the debug log as it happens (in addition to other things).
It’s called Hdg Remote Debug. It’s a live update and debug tool that lets you inspect the GameObjects, components, and serialized fields in your game after it has been deployed onto your Android device (it supports most platforms that Unity supports). You can tweak fields on the live build while sitting in the Unity editor, and it’s great for quickly iterating on settings like UI layout and touch controls.
It also sends back to the editor and debug output that your game produces.
There’s more info on the forums here or you can get it on the Asset Store here!