I used to use this code to retrieve the iOS uptime using Xamarin's classic API:
var uptime = ObjCRuntime.Messaging.Double_objc_msgSend(NSProcessInfo.ProcessInfo.Handle,
new ObjCRuntime.Selector ("systemUptime").Handle);
var ts = TimeSpan.FromSeconds(uptime);
return ts;
I am trying to convert to the Unified API and now I am getting this build error for the above:-
Error CS0122: `ObjCRuntime.Messaging' is inaccessible due to its protection level (CS0122)
I am not sure how to convert this. Can anyone help?
Thanks in advance