iOS 设备的 ADB 等效项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23430181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 00:04:16  来源:igfitidea点击:

ADB equivalent for iOS device

iosxcodedebuggingadbinstruments

提问by user3596455

I was looking some instrument like Android ADB in order to debug iOS devices. I've found iOS instrument, a tool of the XCode that is able to debug app on mobile iOS devices. This instrument is helpful if you have to test your application or some other open source app.

我正在寻找像 Android ADB 这样的工具来调试 iOS 设备。我找到了iOS instrument,这是一个 XCode 的工具,可以在移动 iOS 设备上调试应用程序。如果您必须测试您的应用程序或其他一些开源应用程序,此工具会很有帮助。

I need to test the iOS device, more than my apps, so I was looking for something like Android ADB for iOS devices.

我需要测试 iOS 设备,而不是我的应用程序,所以我正在寻找适用于 iOS 设备的 Android ADB 之类的东西。

Is there something like it?

有类似的吗?

回答by Rob

You asked:

你问:

I would like to know if it's possible execute a touch on the iOS device, such as input events like "tap", "swipe", "drag", "flick" in similar manner of adb shell for android devices. For example, I would like to execute a touch on any icon (such as settings, or some other icon of the main menu) and I am not interesting to debug my apps, but only to emulate an event in order to debug the device.

我想知道是否可以在 iOS 设备上执行触摸操作,例如类似“点击”、“滑动”、“拖动”、“轻弹”等输入事件,类似于 android 设备的 adb shell。例如,我想对任何图标(例如设置或主菜单的其他图标)执行触摸,而我对调试我的应用程序并不感兴趣,而只是为了调试设备而模拟一个事件。

This sort of testing is done via Instruments. See the Automated UI Testingsection of the Instruments User Guide.Also see WWDC 2010 video Automating User Interface Testing with Instruments, which shows some interactive demonstrations of this process. This Cocoa Controls pagehas many other links, too.

这种测试是通过仪器完成的。请参阅Instruments 用户指南自动化 UI 测试部分另请参阅 WWDC 2010 视频使用仪器自动化用户界面测试,其中显示了此过程的一些交互式演示。这个Cocoa Controls 页面也有许多其他链接。

Bottom line, you can use the UI Automation tool in Instruments to automate the testing of your UI. Note, some of us have had issues in iOS 7 with using this on the simulator, but it seems to work fine on physical devices.

最重要的是,您可以使用 Instruments 中的 UI 自动化工具来自动化您的 UI 测试。请注意,我们中的一些人在 iOS 7 中在模拟器上使用它时遇到了问题,但它似乎在物理设备上运行良好。

回答by GrayHymanie

You can use to get the attached ios devices with the command xcrun instruments -s devices.

您可以使用命令来获取附加的 ios 设备 xcrun instruments -s devices

回答by Steve W

If you happen to have Adobe AIR installed with their adt tool (Adobe Developer Tool) you can run:

如果您碰巧安装了带有 adt 工具(Adobe Developer Tool)的 Adob​​e AIR,则可以运行:

adt -devices -platform ios

adt -devices -platform ios