I am looking a way to disable today extension target to decrease build time everytime while developing for application target.
Asked
Active
Viewed 1.8k times
36
-
I came across this post looking for a way to completely disable widgets without removing them from my code base. If anyone else is looking to do the same, remove the widget/extension target from `Target Dependencies` and `Embed App Extensions`. – Kyle Apr 10 '18 at 15:57
2 Answers
72
In order to disable building/running the NSExtension you build, you should:
- Click the project file in the project navigator
- Click the containing app target (the one you DO want to run)
- Click
Build Phases
tab - Open
Target Dependencies
orEmbed App Extensions
- Remove the extension (the one you DON'T want to run)
To bring it back, simply click the +
sign in the same place and re-add it.

nurnachman
- 4,468
- 2
- 37
- 40
-
11
-
2@CQM Removing the extension from Target Dependencies would prevent it from compiling. – Yao Fan Sep 16 '17 at 21:53
-
1
26
In Xcode 9 the Extension was stil visible in the Widget List of the phone. In order to hide totally it I had to remove it from "Embed App Extensions". The procedure is similar to the one described by nurxyz:
- Click the project file in the project navigator
- Click the containing app target (the one you DO want to run)
- Click Build Phases tab
- Open Embed App Extensions
- Remove the extension (the one you DON'T want to run)

DungeonDev
- 1,176
- 1
- 12
- 16