Failed to install app error: Invalid Bundle - No A

2020-02-09 09:20发布

I'm trying to develop an extension of my app for the Apple Watch.

Instead of install the app on the watch, I have this error:

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

In my info.plist files...

For the extension, I have:

<key>CFBundleIdentifier</key>
    <string>com.mycompany.AppName.watchkitextension</string>
<key>WKAppBundleIdentifier</key>
    <string>com.mycompany.AppName.watchkitapp</string>

For the WatchKit app, I have:

<key>CFBundleIdentifier</key
    <string>com.mycompany.AppName.watchkitapp</string>
<key>WKCompanionAppBundleIdentifier</key>
    <string>com.mycompany.AppName</string>

And for my app, I have:

<key>CFBundleIdentifier</key>
    <string>com.mycompany.AppName</string>

Did I miss something?

10条回答
The star\"
2楼-- · 2020-02-09 09:35

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. enter image description here

查看更多
我命由我不由天
3楼-- · 2020-02-09 09:41

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

查看更多
做自己的国王
4楼-- · 2020-02-09 09:43

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"
查看更多
你好瞎i
5楼-- · 2020-02-09 09:48

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!

查看更多
啃猪蹄的小仙女
6楼-- · 2020-02-09 09:51

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.
查看更多
太酷不给撩
7楼-- · 2020-02-09 09:52

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.

查看更多
登录 后发表回答