I am trying to get details from iPhone and in the case of iPhone3GS, the following code leads to a crash:
lockdown.lockdownd_get_value(lockdownHandle, null, "ProductName", out node).ThrowOnError("Failed to get OS Name");//Crashes on iPhone3GS
plistInstance.plist_get_string_val(node, out osType);
Details from Visual Studio on the exception:
iMobileDevice.Lockdown.LockdownException
HResult=0x80131500
Message=An Lockdown error occurred. Failed to get OS Name. The error code was MissingValue
Source=iMobileDevice-net
StackTrace:
at iMobileDevice.Lockdown.LockdownErrorExtensions.ThrowOnError(LockdownError value, String message)
at iDetectLib.iDetect.GetDeviceInfo() in C:\Users\user\source\repos\iDetectApp\iDetectLib\iDetect.cs:line 94
at iDetectApp.MainApp.Main(String[] args) in C:\Users\user\source\repos\iDetectApp\iDetectApp\MainApp.cs:line 17
lockdown.lockdownd_get_value returns MissingValue for ProductName. Are you sure that ProductName is defined for the version of iOS you are running? What does ideviceinfo tell you?
I am trying to get details from iPhone and in the case of iPhone3GS, the following code leads to a crash:
lockdown.lockdownd_get_value(lockdownHandle, null, "ProductName", out node).ThrowOnError("Failed to get OS Name");//Crashes on iPhone3GS plistInstance.plist_get_string_val(node, out osType);
Details from Visual Studio on the exception: iMobileDevice.Lockdown.LockdownException HResult=0x80131500 Message=An Lockdown error occurred. Failed to get OS Name. The error code was MissingValue Source=iMobileDevice-net StackTrace: at iMobileDevice.Lockdown.LockdownErrorExtensions.ThrowOnError(LockdownError value, String message) at iDetectLib.iDetect.GetDeviceInfo() in C:\Users\user\source\repos\iDetectApp\iDetectLib\iDetect.cs:line 94 at iDetectApp.MainApp.Main(String[] args) in C:\Users\user\source\repos\iDetectApp\iDetectApp\MainApp.cs:line 17
How can this be fixed?
Thanks