WatchKit app wont run on simulator

前端 未结 9 1707
旧时难觅i
旧时难觅i 2021-01-04 10:09

error: WatchKit Extension doesn\'t contain any WatchKit apps. Verify that the value of WKWatchKitApp in your WatchKit App\'s Info.plist is set to YES.

相关标签:
9条回答
  • 2021-01-04 10:46

    I was able to fix this error by removing the extension's binary from "Embedded Binaries" in Main App's "General Settings".

    I think that was still in there from the time I created the watch-target, which was for Watch OS 1.

    0 讨论(0)
  • 2021-01-04 10:48

    After weeks and weeks of investigations i finally found out the problem.

    The product name of the Iphone App was the same as the product name of the Watch App.

    Once i changed the Product Name of the WatchApp it worked.

    1. go to your targets. Select the watch app target
    2. go to build settings. Search for Product Name
    3. Edit your Product name to be different than the App Target!
    4. Clean and Build. Should Work. Thanks
    0 讨论(0)
  • 2021-01-04 10:50

    I recently came across this error and after spending many hours trying to get away with it, it seems I finally managed. Read about the solution here: https://blogofpuneet.wordpress.com/

    0 讨论(0)
  • 2021-01-04 10:51

    I had the same issue.

    My problem was that by renaming target, I ended up with the same Product Name for the Main app and the Watchkit App, resulting in overriding themselves while building.

    So everytime I cleaned the build, on the first install it was actually working, but on the second one I was alwas getting this Error.

    When I realized the problem, I also found out that Renaming the product name of the WatchKit App wasnt fixing the issue because XCode doesnt really update all the references to the WatchKit Extension target, maybe there will be a fix later for this. (At the moment i am using XCode 6.3.1)

    Renaming the Product Name of the main app to a different name, fixed anyways the problem.

    Afterwards cleaned and rebuilt and never had that problem again.

    0 讨论(0)
  • 2021-01-04 10:59

    I had to change the compiler for extension & watch app, probably because I added Watchkit App to old project.

    Go to Build Settings "Compiler for C/C++/Objective-C" of extension and watch app, and make sure it's "Default Compiler".

    0 讨论(0)
  • 2021-01-04 11:02

    The solution was really simple. A while back I had removed a few files and re-added them to the extension, but they didn't get added back to compile sources.

    Added the exention's .m files back into it's compile sources and the error went away.

    Very misleading error message.

    0 讨论(0)
提交回复
热议问题