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

佐手、 提交于 2019-11-30 17:29:58

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.

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.

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

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

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).

  1. Quit Xcode and re-build your app.

  2. Delete app and reinstall it.

Solution 1 worked in my case.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!