问题
When running KIF integration tests on device with iOS 8.1.3 I get lots of diagnostic messages of the following kind as console output:
AX Exchange error: Error Domain=Accessibility Code=0 "Remote service does not respond to _accessibilityMachPort" UserInfo=0x1a55de50 {NSLocalizedDescription=Remote service does not respond to _accessibilityMachPort}
This occurs during a call to waitForAccessibilityElement:view:withElementMatchingPredicate:tappable:
.
Otherwise testing works as expected, it just seems a bit verbose. So I am wondering: is this kind of diagnostic output a feature or a bug? How can it be explained? What can or should I do about it, if anything?
回答1:
For people working with Xamarin.iOS, disabling Xamarin.Calabash.Start(); // For Test Cloud
suspends the non-stop logging
回答2:
These warnings apparently disappear if one enables VoiceOver
on the device (with iOS 8.1 Settings
| General
| Accessibility
), however now one gets spammed with (perhaps) lots of redundant audio instead of log messages.
KIF is employing iOS Accessibility (VoiceOver) for what is not its normal purpose, but for locating UI elements by their accessibilityIdentifier
s and accessibilityLabel
s (without serving Accessibility). It is conceivable that the same pattern applies in reported cases around MFMailComposerViewController
for filling mail messages in the UI. If that is so, it may be fair enough if iOS 8.1 reduces Accessibility (VoiceOver) services when they are not needed (enabled) for their normal purposes. That could explain why a Mach port is (apparently) not bound and could in turn explain the observed warning messages.
来源:https://stackoverflow.com/questions/28515414/kif-output-ax-exchange-error-error-domain-accessibility-code-0-remote-service