libimobiledevice-win32 / imobiledevice-net

.NET (C#, VB.NET,...) bindings for libimobiledevice
GNU Lesser General Public License v2.1
297 stars 77 forks source link

lockdownd_validate_pair return UnknownError #179

Open mveril opened 3 years ago

mveril commented 3 years ago

Hellow I can't use the lockdownd_validate_pair method. It's return UnknownError. below you can find a sample code that demonstrate it.

using System;
using iMobileDevice;
using iMobileDevice.Lockdown;

namespace ConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = default;
            LibiMobileDevice.Instance.iDevice.idevice_get_device_list(out var col, ref count);
            foreach (var item in col)
            {
                LibiMobileDevice.Instance.iDevice.idevice_new(out var device, item);
                device.Api.Lockdown.lockdownd_client_new(device, out var lockdown, null);
                Console.WriteLine(lockdown.Api.Lockdown.lockdownd_validate_pair(lockdown, LockdownPairRecordHandle.Zero).ToString());
                lockdown.Close();
                device.Close();
            }
        }
    }
}

Could you please help me ?