简体   繁体   中英

How can I catch the Console log output within my own app in Xamarin.iOS?

I want to programmatically catch the console log within my own iOS app; I know I can redirect WriteLine but that's not enough; I need the 'native' output as well.

You can use the ASL Api from Apple (this a C API which is not bound in Xamarin.iOS, you need to write your own DllImports to the functions you're interested in).

Here is a description of how it's done in (Objective-)C: http://www.cocoanetics.com/2011/03/accessing-the-ios-system-log/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM