15

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!

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
Jay Hickey
  • 600
  • 6
  • 17

7 Answers7

23

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.

Jay Hickey
  • 600
  • 6
  • 17
  • Infuriating problem! You hit the nail on the head though, it was right there in the logs but I missed it in the noise. – FractalDoctor Jul 27 '15 at 09:52
  • Please file a radar at http://bugreport.apple.com including your logs ... Ideally, errors like these should get propagated back to you when you click on "Build & Run" so you don't actually need to go console diving. – Jeremy Huddleston Sequoia Jul 28 '15 at 07:49
  • Accept this answer @Jay Hickey, was hitting my head on the wall for almost a hour for this problem. – Satheesh Jul 28 '15 at 10:50
  • @Jeremy Huddleston Sequoia Filed! [rdar://22057107](http://www.openradar.me/22058517) – Jay Hickey Jul 29 '15 at 21:00
  • @Jay I have added the mentioned key in watch kit extension info.plist. But while loading an http url i got "The resource could not be loaded because the App Transport Security requires the use of a secure connection". Here is the screen shot of project settings: http://postimg.org/image/f2zgt1ijv/ – makboney Apr 08 '16 at 04:46
6

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.

4

Cleaning the build (shift-command-K) fixed this problem for me.

RawMean
  • 8,374
  • 6
  • 55
  • 82
1

You may need to delete the app in iPhone then launch again to solve this problem :)

ltgbau
  • 44
  • 2
1

I had this same issue. This happens due to issue while installing app on watchOS.

Below are some fix for this :

  1. Clean Xcode (try cmd+shift+K and cmd+shift+option+K - Clean Build Folder).

Screenshot

  1. Quit Xcode and re-build your app.

  2. Delete app and reinstall it.

Solution 1 worked in my case.

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
0

In my case, the problem was solved with these process.

  1. Back version control (git) to the commit that doesn't have Apple Watch extension.
  2. Build & run iPhone app.
  3. Re-back to the latest commit and build & run.
mishimay
  • 4,237
  • 1
  • 27
  • 23
0

Me too faced same issue.

In my case the issue was because of the location access alert. Mine app was related to weather app.I was accessing user location,so whenever app is getting launched,iphone simulator have an alert ,asking the user to allow/disallow picking of his location.

After giving location permission watch app simulator launched successfully.

Hope this might help someone.

Shyam
  • 417
  • 4
  • 16