Hey all,
I’m having some issues getting Debug.Log() or NSLog() or any other print commands to the console to register on my device during runtime. I’m attempting to debug some native features that can’t be tested in the Unity editor, but so far I can’t even get the debug logs to show in the XCode console (also tried using the iPhone Configuration Utility to view the console on my device).
When I build to my device and connect it to my computer and run the app, I only see one NSLog() successfully print to the console, which is: “: → registered mono modules 0x1c778a0”, found in main.mm.
I don’t even see the default printf_console commands that are default to the XCode project, such as:
printf_console(“-> applicationDidFinishLaunching()\n”) in the UnityAppController.mm.
Here’s the general overview of what I’ve tried so far, with no luck on getting debug logs from Unity or XCode/Obj-C to register:
- Build to iOS platform by using ‘Build’ or ‘Build and Run’, neither seem to make a difference.
- In the XCode project, I haven’t changed any of the settings in Build Settings to strip or remove the Debug information in the Debug or Release builds.
- I tried building and running the app by selecting Product → Run (cmd+R) and also by Product → Archive and installing the .ipa file manually using the Organizer in XCode. Neither seem to make any difference here.
This hasn’t been an issue in the past, but I did recently upgrade to XCode 5.1.1 and Unity 4.5.1f3 - not sure if this issue is somehow related to these versions. Any ideas why I wouldn’t be able to retrieve debug logs from my device? I tried doing some digging on this but couldn’t find anyone who was having the same issue with recent versions of Unity and Xcode.
Thanks