Netimobiledevice 0.9.7
See the version list below for details.
dotnet add package Netimobiledevice --version 0.9.7
NuGet\Install-Package Netimobiledevice -Version 0.9.7
<PackageReference Include="Netimobiledevice" Version="0.9.7" />
paket add Netimobiledevice --version 0.9.7
#r "nuget: Netimobiledevice, 0.9.7"
// Install Netimobiledevice as a Cake Addin #addin nuget:?package=Netimobiledevice&version=0.9.7 // Install Netimobiledevice as a Cake Tool #tool nuget:?package=Netimobiledevice&version=0.9.7
Netimobiledevice
Netimobiledevice is a .Net Core implementation for working with all iOS devices (iPhone, iPad, iPod) as well the plists that they use.
Features
- Backup an iOS device in the normal iTunes way or as customised as you like.
- Device discovery and connection via Usbmux.
- Interact with iOS services
- Handle all Plists whether they are in XML or Binary format
Installation
To install Netimobiledevice, you can use the following command in the Package Manager Console:
Install-Package Netimobiledevice
Alternatively, you can use the .NET CLI:
dotnet add package Netimobiledevice
Usage
A few examples of how to use Netimobiledevice are below.
Get a list of all currently connected devices using:
using Netimobiledevice.Usbmuxd;
List<UsbmuxdDevice> devices = Usbmux.GetDeviceList();
Console.WriteLine($"There's {devices.Count} devices connected");
foreach (UsbmuxdDevice device in devices) {
Console.WriteLine($"Device found: {device.DeviceId} - {device.Serial}");
}
Listen to connection events:
Usbmux.Subscribe(SubscriptionCallback);
private static void SubscriptionCallback(UsbmuxdDevice device, UsbmuxdConnectionEventType connectionEvent)
{
Console.WriteLine("NewCallbackExecuted");
Console.WriteLine($"Connection event: {connectionEvent}");
Console.WriteLine($"Device: {device.DeviceId} - {device.Serial}");
}
Get the app icon displayed on the home screen as a PNG:
using (LockdownClient lockdown = LockdownClient.CreateLockdownClient("60653a518d33eb53b3ca2322de3f44e162a42069")) {
SpringBoardServicesService springBoard = new SpringBoardServicesService(lockdown);
PropertyNode png = springBoard.GetIconPNGData("net.whatsapp.WhatsApp");
}
Create an iTunes backup:
using (LockdownClient lockdown = LockdownClient.CreateLockdownClient("60653a518d33eb53b3ca2322de3f44e162a42069")) {
using (DeviceBackup backupJob = new DeviceBackup(lockdown, @"C:\Users\User\Downloads")) {
backupJob.BeforeReceivingFile += BackupJob_BeforeReceivingFile;
backupJob.Completed += BackupJob_Completed;
backupJob.Error += BackupJob_Error;
backupJob.FileReceived += BackupJob_FileReceived;
backupJob.FileReceiving += BackupJob_FileReceiving;
backupJob.FileTransferError += BackupJob_FileTransferError;
backupJob.PasscodeRequiredForBackup += BackupJob_PasscodeRequiredForBackup;
backupJob.Progress += BackupJob_Progress;
backupJob.Status += BackupJob_Status;
backupJob.Started += BackupJob_Started;
await backupJob.Start();
}
}
Pair an iOS device asyncronously:
using (LockdownClient lockdown = LockdownClient.CreateLockdownClient(testDevice?.Serial ?? string.Empty)) {
Progress<PairingState> progress = new();
progress.ProgressChanged += Progress_ProgressChanged;
await lockdown.PairAsync(progress);
}
private void Progress_ProgressChanged(object? sender, PairingState e)
{
Console.WriteLine($"Pair Progress Changed: {e}");
}
Services
The list of all the services from lockdownd which have been implemented and the functions available for each one. Clicking on the service name will take you to it's implementation, to learn more about it.
- com.apple.afc
- Interact with the publicly available directories and files
- com.apple.misagent
- Management for provisioning profiles
- com.apple.mobile.diagnostics_relay
- Query MobileGestalt & IORegistry keys.
- Reboot, shutdown or put the device in sleep mode.
- com.apple.mobile.installation_proxy
- Browse installed applications
- Manage applications (install/uninstall/update)
- com.apple.mobile.notification_proxy & com.apple.mobile.insecure_notification_proxy
- Send and receive notifications from the device for example informing a backup sync is about to occur.
- com.apple.mobilebackup2
- Backup Creation
- Communication with the Backup service
- com.apple.os_trace_relay
- Get pid list
- com.apple.springboardservices
- Get icons from the installed apps on the device.
- com.apple.syslog_relay
- Stream raw syslog lines from the device.
License
This project is licensed under the MIT LICENSE.
Contributing
Contributions are welcome. Please submit a pull request or create an issue to discuss your proposed changes.
Acknowledgments
This library was based on the following repositories with either some refactoring or in the case of libraries such as libusbmuxd translating from C to C#.
- BitConverter: Provides a big-endian and little-endian BitConverter that convert base data types to an array of bytes, and an array of bytes to base data types, regardless of machine architecture.
- libimobiledevice: A cross-platform protocol library to communicate with iOS devices
- libusbmuxd: A client library for applications to handle usbmux protocol connections with iOS devices.
- MobileDeviceSharp: A C# object oriented wrapper around Libimobiledevice
- PList-Net: .Net Library for working with Apple *.plist Files.
- pymobiledevice3: A pure python3 implementation to work with iOS devices.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 220 | 10/24/2024 |
1.2.1 | 338 | 9/18/2024 |
1.2.0 | 120 | 9/16/2024 |
1.1.1 | 388 | 7/15/2024 |
1.1.0 | 183 | 7/1/2024 |
1.0.3 | 233 | 5/31/2024 |
1.0.2 | 221 | 5/9/2024 |
1.0.1 | 203 | 4/29/2024 |
1.0.0 | 658 | 4/17/2024 |
0.13.2 | 340 | 2/22/2024 |
0.13.1 | 295 | 2/12/2024 |
0.13.0 | 297 | 2/9/2024 |
0.12.0 | 287 | 2/5/2024 |
0.11.0 | 309 | 1/30/2024 |
0.10.2 | 433 | 1/3/2024 |
0.10.1 | 559 | 12/20/2023 |
0.10.0 | 415 | 12/18/2023 |
0.9.7 | 554 | 11/7/2023 |
0.9.6 | 504 | 10/16/2023 |
0.9.5 | 529 | 10/12/2023 |
0.9.4 | 476 | 10/11/2023 |
0.9.3 | 475 | 10/10/2023 |
0.9.2 | 487 | 10/5/2023 |
0.9.1 | 533 | 9/27/2023 |
0.9.0 | 508 | 9/15/2023 |
0.8.0 | 584 | 8/31/2023 |
0.7.3 | 535 | 8/22/2023 |
0.7.2 | 596 | 8/21/2023 |
0.7.1 | 603 | 8/17/2023 |
0.7.0 | 568 | 8/15/2023 |
0.6.4 | 612 | 8/9/2023 |
0.6.3 | 684 | 8/3/2023 |
0.6.1 | 679 | 7/27/2023 |
0.6.0 | 679 | 7/25/2023 |
0.5.3 | 685 | 6/9/2023 |
0.5.2 | 656 | 6/8/2023 |
0.5.1 | 667 | 5/31/2023 |
0.5.0 | 681 | 5/24/2023 |
0.4.0 | 693 | 5/10/2023 |
0.3.0 | 683 | 5/9/2023 |