title: Accessing an iOS device over USB on mac
body: <p>I have a mobile app that needs to transfer files to a database. However, one of the specifications for this is that, if the user does not have a wireless network set up it should be able to be plugged into a mac and transfer a file to the database. The issue I am running into, however, is how to get said files off the iPad and onto the computer via USB.</p>
  
  <p>I have spent the last week looking into various solutions, mainly IOKit and applescript, but both of these seem to be unable to locate the iOS device when it is plugged in with a USB cable. While I know that I could jailbreak the device and then it should be simple, this is not an option.</p>
  
  <p>I have had a difficult time finding information on this subject, which makes me worry that it is hopeless.</p>
  
  <p>However, I know there must be a way to do this without jailbreaking because there exists <a href="http://www.digidna.net/diskaid#appsIntLnk" rel="nofollow noreferrer">this beautiful app.</a> I have been able to access the files I need to through this app so I know for sure it is possible. This, however, is not an ideal solution as I really don't have the option to use third party software for my application. I suspect that the app uses applescript to do it as it has an executable called appleScriptServer in the install directory that looks like it may be what handles this.</p>
  
  <p>What I need is to understand how they access the files and implement a similar scheme for my (much simpler) needs.</p>
  
  <p>Does anyone know of some way to do this? If it is possible in IOKit or through applescript, I would like some resources that help me understand how to properly locate and access an iPad when plugged into the USB port on a mac. The closest I have come was using <code>user$ system_profiler SPUSBDataType</code> from <a href="https://stackoverflow.com/a/14018748/2241785">this thread</a> that lets me know: </p>
  
  <pre><code>          iPad:
  
            Product ID: 0x12a4
            Vendor ID: 0x05ac  (Apple Inc.)
            Version: 3.10
            Serial Number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            Speed: Up to 480 Mb/sec
            Manufacturer: Apple Inc.
            Location ID: 0x1d110000 / 7
            Current Available (mA): 500
            Current Required (mA): 500
            Extra Operating Current (mA): 1600
  </code></pre>
  
  <p>but I don't know that I can use any of the information it gives me other than to verify that it is plugged in via USB.</p>
  
  <p>Thank you very much for any help you can give me.</p>