We're migrating to Xcode 9 on macOS 10.12.6 and having a problem with UI testing via command line. While running, the XCTRunner process simulates "Hitting home button to enter background" and then times out after thirty seconds waiting for testmanagerd to send AXNotification 4002 to confirm the device event. In the logs, I noticed the following error:
2017-10-03 15:06:20.566488-0700 xyz-ui-tests-Runner[30134:1552734] -[DTXFileDescriptorTransport initWithXPCRepresentation:]: unrecognized selector sent to instance 0x61c0000cae20
Digging a little, it seems that initWithXPCRepresentation is a new method on DTXFileDescriptorTransport for Xcode 9 and appears to be missing from some dynamic library. I've noticed that the xyz-ui-tests_iphonesimulator11.0-x86_64.xctestrun file contains the following XML:
<key>__XPC_DYLD_FRAMEWORK_PATH</key>
<string>/my_local_path/DevDerivedData/Build/Products/Debug-iphonesimulator</string>
<key>__XPC_DYLD_LIBRARY_PATH</key>
<string>/my_local_path/DevDerivedData/Build/Products/Debug-iphonesimulator</string>Does anybody have suggestions on where to look? Could this be a versioning problem with some dynamic library for XPC? Any help appreciated.