Open WimVriend opened 4 years ago
To add some info to my issue: I have installed the latest iTunes and have tried my little .NET program on W10 and W7. On the iOS side I have used peertalk-simple, which works fine between iPhone and Mac. I'd love to see it work with my PC...
I must say: response on this 'forum' is very meagre. Is there an imobiledevice-net developer or moderator out there?
Hi,
You can make connection and get data using ilibmobile binaries. I am able to take the backup of the iPhone device using these commands. I run commands in my process. Its supper easy.
Below are the commands which I am using for device pairing, fetching device info and taking backup:
For pairing: dir_name + "\binaries\idevicepair.exe pair"
For device space info: dir_name + "\binaries\ideviceinfo.exe -q com.apple.disk_usage"
For backup: dir_name + "\binaries\idevicebackup2.exe backup --full C:\Temp"
For help: dir_name + "\binaries\idevicebackup2.exe backup -h"
Hope this would resolve your problem.
Hello NehaBector,
I'm not sure how to fit your answer into my code. Do you mean I have to somehow 'pair' my host and the iPhone in some way? Where does your code go in my VB .NET example?
Hi WimVriend,
Instead of using nuget package you can run these binaries in vb.net process. I started using nuget packages but ended up getting no result. But binaries have everything. Yes you can pair the host with device though it works without that too but its better to pair to make sure the iPhone is connected with the host.
Hi again,
Is it possible to accomplish port forwarding with these binaries? I would like to establish a TCP connection between the iPhone and my .NET program.
Hi there!
After a short pause, I decided take a look at imobiledevice again, to see why it didn't work before. It took a bit of reading through other people's issues, when a lightbulb appeared above my head: you must start a 'socket listener' on the iPhone, before connecting!
The only thing that puzzles me is: why return an UnknownError? IMO a more explanatory errorcode (like NO_LISTENER_ON_PORT) would have helped me a lot...
Hello experts,
I am looking for a way to receive realtime-data from an iPhone via USB and after reading this blog on the subject, I started a small VB .NET project (using VS2013). Getting imobiledevice.net with the packagemanager went fine and soon I was off to a promising start: I was able to get the name(s) from connected devices and I was even able to create an eventhandler to handle plugging and unplugging an iPhone. Great!
So today I thought: let's get some data! Unfortunately, that did not go so well. I do get a valid iDeviceHandle, but the idevice_connect function keeps returning '-2' (UnknownError). Logically that also leads to an invalid iDeviceConnectionHandle.
Does anyone have any clues for me, on how to fix this?