Failed to install app error: Invalid Bundle - No Apple Watch Binary

折月煮酒 提交于 2019-11-29 01:52:53

Try explicitly setting the "Executable file" in the WatchKit app's info.plist.

I had changed the name of my executable file and had the same issue.

This error plagued me for about 7 hours then I restarted my watch out of desperation and the error went away.

I was plagued with this error for hours. For me, the problem was that my WatchKit Extension's Deployment Target was set to an iOS version higher than my phone's. I simply changed it to match my device's version and it worked perfectly.

For me the problem was fixed by adding the watch app to my iOS target's Embed Watch Content section.

I'm using Xcode 7 and watchOS 2.0. It was building fine on the device, but the simulator was giving me this error.

Steps:

  1. Find your iOS target
  2. Click Build Phases
  3. Ensure your watch app (.app) is included in "Target Dependencies" and "Embed Watch Content"

In my case, none of these solutions worked for me, however I noticed that by default, my WatchKit App required iOS 8.3, and my phone was running iOS 8.2. Updating the OS to 8.3 solved my problem. It may seem like an obvious solution, but I thought I would share for anyone who could share my problem.

In my case, I got it when building app for WatchOS2. I fixed by setting the schemes like this:

The Watch Extension Scheme builds 3 Target: iPhone (2 dependencies) + Extension (no dependencies) + Watch App

Running Extension Scheme on iPhone simulator -> works!

In my case it was an Info.plist configuration error. The Bundle identifier was different to the NSExtension -> NSExtensionAttributes -> WKAppBundleIdentifier.

Setting the same value fixed the error.

Resets of watch/xcode/iphone doesn't help sometimes, as it described in other answer.

One more case to solve this: This error appears, when I change iPhone language of my iPhone to not English (in my case - Russian) language. When I set back English - everything start works as usual!

Make sure:

  • The bundle id of iOS app is prefix of watch app & extension' bundle id.
  • Value of WKCompanionAppBundleIdentifier in Info.plist of your watch app matches bundle id of your iOS app.
  • iOS app, watch app & extension should signed by the same cert.
  • There must be a build phase in iOS app target:
    • Destination: Products Directory
    • Subpath: $(CONTENTS_FOLDER_PATH)/Watch
    • Click +, add your watch app target.

Filling in the Bundle Display name in the info.plist.Default is blank,there will be an alert.(Xcode 7.3)

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