从 Mac 上的 Objective-C 查找已连接 Iphone 设备的 UUID
我可以从 Mac 上的 Objective-C 找到已连接 Iphone 设备的 UUID 吗?通过 USB 电缆连接的 Iphone 的列表。
Can I find UUID of connected Iphone devices from the objective-c on the mac? Something of a list of connected Iphones trough the usb cable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试一下:
对于每个连接的设备。
Try this:
for each of your connected devices.
使用 ioreg 命令,并 grep 收到的结果。一个极简的实现:
我可以合并更多检查并进一步解析结果,以确保它确实是一部 iPhone,以防万一其中列出了更多设置了“USB 序列号”属性的设备。检查“SupportsIPhoneOS”属性将进一步确认设备的身份。这样,我实际上可以构建已连接的 iPhone/iPod 设备的列表,并从“usb 序列号”属性中获取它们的 UUID。
Use the ioreg command, and grep the received results. A minimalist implementation:
I could incorporate more checks and further parse the results, to make sure it's really an iPhone, just in case there are more devices listed in there that have the "usb serial number" property set. Checking the "SupportsIPhoneOS" property would further confirm the device's identity. This way, I could actually build a list of connected iPhone/iPod devices, and get their UUID's from the "usb serial number" property.
苹果公司对 iPhone 保持着高度锁定。我认为如果不通过 USB 编写一些低级代码,您会发现从 iPhone 查询任何内容都不容易。
您需要这样做有什么具体原因吗?您不能只查看 Xcode 中的 Organizer 窗口并查看那里连接了哪些设备吗? Organizer 显示 UUID 和有关连接设备的更多信息,包括崩溃时间、iPhone 控制台、屏幕截图和配置。
Apple keeps the iPhone pretty locked down. I don't think you'd find it easy to query anything from the iPhone without some low level code over USB.
IS there a specific reason you need to do this? Can you not just look in the Organizer window in Xcode and see what devices are connected there? The Organizer shows the UUIDs and more information about connected devices, including crash longs, the iPhone's console, screenshots and provisioning.