且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Xcode-Instruments无法使用我选择的应用目标在模拟器上运行应用

更新时间:2023-10-20 21:20:58

我刚刚使用Xcode中的Product-> Profile对应用程序进行了配置,并使用目标打开了Instruments.目标是派生数据-> MyApp-> Build Products-> Release-iphonesimulator-> MyApp.app-> MyApp unix可执行文件下的Unix可执行文件.

I just profiled the app using Product -> Profile in Xcode, and that opened up Instruments with the target. The target was the Unix executable under Derived Data -> MyApp -> Build Products -> Release-iphonesimulator -> MyApp.app -> MyApp unix executable.

此外,在使用KIF时,我为情节提要中的某些视图启用了辅助功能标签.在Instruments中运行自动化测试时,该应用似乎以某种方式考虑了将可访问性标签设置为一个元素且无法访问该视图上子元素的视图.为了与Instruments一起运行,我只是禁用了视图的可访问性标签,并且再次发挥了作用!

Also, while using KIF, I had enabled accessibility labels for some views in the storyboard. While running the automation tests in Instruments, the app seemed to somehow consider the views which had the accessibility labels set as one single element and could not access sub-elements on this view. In order to run with Instruments, I just disabled the accessibility labels for the views and it worked like a charm again!