Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchOS 2: "Cannot Install Watch App" "Error Launching 'TestApp WatchKit App Extension'"

I am getting a AlertView popup error on iOS every time I try to install a watchOS 2 app in Xcode 7 beta 4:

Cannot Install Watch App

TestApp is installed on your iPhone, but the TestApp app for Apple Watch is currently unavailable.

I've also tried installing the watchOS app through the Apple Watch iOS app, but I get the same error. And when I try to run the watchOS target, I get this:

Error Launching 'TestApp WatchKit App Extension'

Installation error. Check the iPhone console for more details."

Screenshot I checked the iPhone console and no additional details are there.

I've reinstalled Xcode, deleted and re-added all simulators, reset simulator content & settings...none of which has worked. I also created a completely new project. This is occurring in the simulator and on a physical device/watch running iOS 9 beta 4 and watchOS 2 beta 4.

Has anyone figured out a fix or workaround for this?

Thanks!

like image 848
Jay Hickey Avatar asked Jul 26 '15 19:07

Jay Hickey


2 Answers

Looking through the device system logs, I found my issue:

Jul 26 18:05:14 MacBook-Pro companionappd[22461]: (Error) WatchKit: validateWatchKitApplicationInfoDictionary, invalid Info.plist key 'NSAppTransportSecurity'

I had an App Transport Security key set on both the watchOS app info.plist and the watchOS extension info.plist. It should only be set on the extension.

like image 75
Jay Hickey Avatar answered Oct 04 '22 21:10

Jay Hickey


You should remove NSAllowsArbitraryLoads key from info.plist of watch app. Watch Extension only allow NSAllowsArbitraryLoads key to include. Because only extension is responsible for handling all these things not the watch app.

like image 32
Vipendra Gupta Avatar answered Oct 04 '22 22:10

Vipendra Gupta