Works on Simulator, does not work on device: error: WatchKit application does not contain any WatchKit extensions

I see the following error when I try to run a project on a real device, in the simulator it works fine.

error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension Info.plist is set to com.apple.watchkit

Things that may or may not be relevant

  • I use cocoa pods in both the watch and the main target application
  • Mostly objective-c project, but has some quick files
  • Xcode 8.1 (8B62)
  • Device software versions: iOS 10.1.1 and WatchOS 3.1
  • Deployment Information> Deployment Goal: iOS 10.0 watchOS 3.0

Ive tried things

  • I checked several times that all the correct files belong to the target hour. Maybe I missed something, but I assume that it will not work on the simulator, if so.
  • Package Identifiers
    • main application < app id > : < app id >
    • watch app package < app id >.watchkit : < app id >.watchkit
    • watch applications WKCompanionAppBundleIdentifier : < app id >
    • extension package ID: < app id >.watchkit.extension
    • watch extensions NSExtension > NSExtensionAttributes > WKAppBundleIdentifier : < app id >.watchkit
  • NSExtension > NSExtensionPointIdentifier : com.apple.watchkit
  • WKWatchKitApp installed in YES both in the Clock Extension application and in the Surveillance application
  • I removed and re-added .appex from Build Phases > Embed App Extensions
  • Mach-O Type set to executable for all purposes
  • Reinstalling modules as described in this answer
  • Clearing Received Data
  • Cleaning the build folder
  • Xcode restart
  • I tried the archive and it failed with the same error

Instead of an answer, debugging / troubleshooting advice would be appreciated as well.

+6
source share
2 answers

I saw this intermittently, but usually rebuilt a second time, fixing it. I never understood why.

I always assumed this was a bug in Xcode.

Sorry, there can be no more help, but you are not alone in this.

+2
source

I ran into this error with three other errors.

It turned out that the problem is that Valid Architectures installed incorrectly. In the Build Settings section, verify that Valid Architectures includes i386 and armv7k .

Once this is fixed, the watch extension will be built and all errors will disappear.

0
source

Source: https://habr.com/ru/post/1011972/


All Articles