Search code examples
iosxcodewatchoswatchappwatchos-simulator

Understanding builds for Watch-iPhone app in XCode


I have an iPhone app with an Apple extension and when I build the app in XCode only the Watch app starts building, I see both simulators but the iPhone app doesn't launch, is this a normal behavior when testing iPhone+Watch app?

I would like to have more control as far as builds since at times I just want to test the iPhone app and the Watch app doesn't need to be involved and vice versa.

  1. Can I have both apps launch when building in Xcode so I can debug both?

  2. Can I stop testing the watch app and only test the iPhone app if I wanted to?

  3. Is there a way to speedup the build time?

Thanks


Solution

  • If the Watch App's or Watch Extension's scheme is selected, when you press Build, only your Watch app will launch.

    You can launch both separately and debug both. If you only want to test the iPhone app, you can do it exactly as usual by selecting the iPhone app and running it from Xcode.

    Regarding the build time, I think it's as fast as possible. Just make sure you don't have something that causes a full rebuild each time you are debugging, as build usually takes less than 2 seconds when working on a project if the project is not building from ground up (which usually takes over a minute in a normal-sized project).