iOS 辅助功能标签未显示在设备构建的 Instruments 中
我一直在将可访问性标签放入我们的源代码中,以便我们可以使用苹果自动化框架进行自动化。当我们第一次开始这个项目时,我们使用 sdk 4.3 进行构建,我在让模拟器在应用程序中显示标签时遇到了麻烦。通过有关堆栈溢出的建议,我能够通过更改模拟器文件中的accessibility.plist来修复它。
现在我们已经切换到 iOS sdk 5.0。我遇到了相反的问题。当我运行自动化测试时,我无法再让标签显示在设备上。它们在模拟器中显示得很好。我还可以通过打开设备上的 VoiceOver 并在应用程序窗口中执行三次双选项卡来显示元素,来确认它们是否已正确编译到应用程序中。
我检查了所有构建设置并确保所有内容都设置为调试构建,并尝试返回到我知道在为 4.3 设备构建时有效的构建并具有相同的精确设置(sdk 版本除外)当然)但标签仍然没有被拿起。
那么我该去哪里呢?为 iOS 5 构建时是否需要将库文件包含到应用程序中?
I have been putting accessibility labels into our source code so that we can automate using apples automation framework. When we first started this project, we were building using sdk 4.3 and I had troubles getting the simulator to show the labels in the application. Through advice on stack overflow I was able to fix it by altering the accessibility.plist in the simulator files.
Now that we have switched over to iOS sdk 5.0. I am having the opposite problem. I can no longer get the labels to show up on the device when I run our automation tests. They show up fine in the simulator. And I'm also able to confirm that they were properly compiled into the application by turning on VoiceOver on the device and doing a triple-double tab of and application window to show the elements.
I've looked over all the build settings and made sure everything was set to a debug build, and have tried going back to a build that I know worked when building for a 4.3 device and having the same exact settings(except for the sdk version of course) but the labels are still not being picked up.
So where do I go from here? Is there a library file that needs to be included into the application when building for iOS 5?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在设备上的“设置 > 辅助功能 > 三次单击主页”中,选择“询问”。这似乎打开了“足够”的辅助机制来使事情正常工作,但不会太多以至于会干扰设备的正常功能(例如,打开 VoiceOver 也可以工作,但会改变设备的流程)应用程序以破坏测试的方式。)
On the device, in "Settings > Accessibility > Triple-click Home", choose "Ask". This seems to turn on "enough" of the accessibility machinery to make things work, but not so much of it that it'll interfere with the normal functions of the device (ex. turning on VoiceOver works too, but changes the flow of the app in ways that break tests.)