Prevent deployment (disable) WatchKit app from iOS iPhone App in Xcode

We have an Xcode project with build settings for the Apple Watch. The Apple Watch app is not ready yet, so we would like to disable it. What is the best way to disable Apple Watch functionality in an assembly?

+45
ios xcode watchkit
May 24 '15 at 17:50
source share
1 answer

Remove WatchKit extension

To ensure that the WatchKit extension is no longer displayed, you must do two things:

1) Remove WatchKit extension from "Target Dependencies"

  • (To go to Goal Dependencies: in the project navigator, click the project file, then click the goal of the iPhone application. Go to the Build Phases tab.)

2) Remove the WatchKit extension from the "Embed App Extensions" (in Xcode 7+, "Paste Content")

  • (In the “Build Phases” section, go to “Extending Application Extensions.” Remove the WatchKit extension entry from the “Extensions for Application Extensions” list.)

Finally, you may need to clear the build folder. Then create and run the iPhone app.

To add a WatchKit extension:

For watchOS1: FIRST add the WatchKit extension to Target Dependencies. This re-creates the .appex file, which you can now add to the list in Embed App Extensions by clicking the plus button and selecting "App Name WatchKit Extension.appex".

For watchOS2: just add the WatchKit extension to the target dependencies.

Notes:

  • I tried the whole process of removing and reconstructing the extension both in the simulator and on real devices (iPhone and Apple Watch). He worked in both cases.
  • I also tried to do either A or B, but that was not enough.
  • I used Xcode version 6.3.2
+86
May 25 '15 at 9:33
source share



All Articles