What is UIATargetHasGoneAWOLException while operating iphone with UIAutomation through Instruments.
I am using UIAutomation, through Instruments from Xcode, to do something on iPhone, and got a weird exception:
Anybody know what does this exception mean?
3 Solutions Collect From Internet About “What is UIATargetHasGoneAWOLException while operating iphone with UIAutomation through Instruments.”
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.
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.
You can find a good documentation on Apple Website explaining when this exception is thrown :
Apple UIATarget Class – Exception
I hope it will help you
- Applying transform to UITextView – prevent content resizing
- How to check if CMTime is valid in Swift?
- How to change the style of an UIView when it's tapped?
- Xcode always stopping at main.m after a crash
- How can I find out the Objective-C generics type?
- difference between desiredAccuracy and distanceFilter
- Building app for App Store and Enterprise Distribution
- Creating a programmatic tab bar with storyboard view controllers?
- How can I break out of two nested for loops in Objective-C?
- Adding quartzcore to xcode 4 for iOS
- iOS 11 UITableView bug
- Write into Settings bundle in Swift
- UIScrollview setContentOffset with non linear animation?
- Failed to Load Resource, Plugin Handled Load on iOS
- Combining Swift and Objective-C in a CocoaPod