在Mac上通过USB访问iOS设备 [英] Accessing an iOS device over USB on mac

查看:314
本文介绍了在Mac上通过USB访问iOS设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要将文件传输到数据库的移动应用程序.但是,对此的规范之一是,如果用户没有建立无线网络,则应该能够将其插入Mac并将文件传输到数据库.但是,我遇到的问题是如何将上述文件从iPad上通过USB传输到计算机上.

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.

上周我一直在研究各种解决方案,主要是IOKit和applescript,但是当使用USB电缆插入iOS设备时,这两种方法似乎都无法找到它.虽然我知道我可以越狱该设备,然后应该很简单,但这不是一个选择.

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.

我很难找到有关该主题的信息,这使我担心它是没有希望的.

I have had a difficult time finding information on this subject, which makes me worry that it is hopeless.

但是,我知道必须有一种无需越狱的方法,因为存在一个这个漂亮的应用程序. 我已经可以通过该应用程序访问所需的文件,因此我确信这是可能的.但是,这不是理想的解决方案,因为我确实没有选择将第三方软件用于我的应用程序.我怀疑该应用程序使用applescript来执行此操作,因为它在安装目录中有一个名为appleScriptServer的可执行文件,看起来可能是处理此问题的原因.

However, I know there must be a way to do this without jailbreaking because there exists this beautiful app. 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.

我需要了解它们如何访问文件并为我的需求(更简单)实施类似的方案.

What I need is to understand how they access the files and implement a similar scheme for my (much simpler) needs.

有人知道这样做的方法吗?如果可以通过IOKit或通过applescript,我希望有一些资源可以帮助我了解如何在插入Mac上的USB端口时正确定位和访问iPad.我最接近的是使用此线程中的user$ system_profiler SPUSBDataType,让我知道:

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 user$ system_profiler SPUSBDataType from this thread that lets me know:

          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

但是我不知道我可以使用它提供给我的任何信息,除非要验证它是否已通过USB插入.

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.

非常感谢您能给我的帮助.

Thank you very much for any help you can give me.

推荐答案

您可以使用 MobileDevice框架,如此答案中所解释的那样.

You can use the MobileDevice framework, as explained in this answer to a question similar to yours.

这篇关于在Mac上通过USB访问iOS设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆