What is UIATargetHasGoneAWOLException while operating iphone with UIAutomation through Instruments.
Asked Answered
L

2

2

I am using UIAutomation, through Instruments from Xcode, to do something on iPhone, and got a weird exception: UIATargetHasGoneAWOLException.

Anybody know what does this exception mean?

Lumber answered 10/3, 2012 at 0:15 Comment(0)
D
5

I've found that this occurs when certain unknown conditions exist AND an iPhone is connected to the computer. Disconnecting the iPhone will solve the problem.

Unfortunately, I don't know what the "certain unknown conditions" are, because a connected iPhone device doesn't automatically result in this exception. But I do see that disconnecting the iPhone is sufficient to prevent it.

Dalliance answered 27/4, 2012 at 16:12 Comment(1)
I agree. Here's an Open Radar that covers this: openradar.appspot.com/11168782Bilinear
B
0

I found this article that gives a great explanation for UIATargetHasGoneAWOLException, and his solution worked for me.

Basically, the generated Info.plist file inside your .app is missing some attributes. I was able to add the following to my Info.plist and it worked as expected:

    <key>CFBundleSupportedPlatforms</key>
    <array>
            <string>iPhoneSimulator</string>
    </array>
    <key>DTPlatformName</key>
    <string>iphonesimulator</string>
    <key>DTSDKName</key>
    <string>iphonesimulator6.0</string>
    <key>UIDeviceFamily</key>
    <array>
            <integer>1</integer>
    </array>

Btw, Xcode by default builds your .app binary in ~/Library/Application Support/iPhone Simulator/6.1/Applications/..., where ... is some random ID string that Xcode generates. Once you locate the right Application directory, right click on your .app file and Show Package Contents. In there, you'll find the Info.plist file where you can add the above code.

Bankston answered 3/5, 2013 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.