ImagineLearning-Public / MobileDevice

Allows communication with iDevices. Fork from mobiledevice.codeplex.com, making use of house arrest service (as opposed to AFC) to transfer files to documents directory.
6 stars 9 forks source link

AFCFileRefOpen fails with iTunes 12 #7

Open dtaylor2 opened 9 years ago

dtaylor2 commented 9 years ago

Hi

Thanks for this library, it came in handy when transferring files to an iOS device. I previously used it with iTunes 10.7 and it worked great, I’ve tried it with iTunes 12.2.1.16 and I hit some problems. When I try using AFCFileRefOpen during the iPhoneFile.Open method it return the error code 7. I’m not sure what that code represents, but going off this list (https://www.theiphonewiki.com/wiki/MobileDevice_Library#Known_Error_Codes) I assume it represents an kAMDInvalidArgumentError. Do you have any thoughts on what might be causing that error code?

I was thinking the iPhone.AFCHandle might be incorrect but it’s the same AFCHandle used in some methods of the iPhone class (eg. Exists & GetDirectories) that I call before that point. The other arguments; the path, the OpenMode and that unknown argument may be the cause. Could the method signature have changed between the versions of iTunes?