I am trying to integrate TestFlightSdk into an application that I created using MonoTouch .
I am trying to implement logging in my application so that TestFlightSdk picks it up. It supposedly automatically collects NSLog ged text, but I can’t find the right combination of code to add to my own C # / MonoTouch application that does the same.
What I tried:
Console.WriteLine("...");Debug.WriteLine("..."); (but I think it just calls Console.WriteLine )- Implementing
NSLog support, but it crashed my application, so apparently I did something wrong (I will ask a new question if this is a way forward.)
Is there anything built into MonoTouch that will record log messages through NSLog so that I can use it with TestFlightSdk? Or do I need to flip my own shell for NSLog?
To implement NSLog myself, I added the following:
public static class Logger { [DllImport("/System/Library/Frameworks/Foundation.framework/Foundation")] private extern static void NSLog(string format, string arg1); public static void Log(string message) { NSLog("%s", message); } }
(I got the code snippets above from this other SO question: How to link the iOS Foundations NSLog function .)
But this is a crash of my application with a SIGSEGV error.
source share