Xcode cannot unit-test WatchOS targets

Number:rdar://35688518 Date Originated:2017-11-26
Status:Duplicate/21395998 Resolved:
Product:Developer Tools Product Version:
Classification:Suggestion Reproducible:
# Summary

In Xcode, unit-test targets cannot be created for the WatchOS platform. 

# Detail

I've tried two ways to do this:
1. Create a target, select WatchOS platform, then... no Unit Test template is available in the "Choose a template" dialog
2. Create an *iOS* unit test target, then try to change its platform to WatchOS. The "Target to be tested" list view doesn't allow WatchOS targets to be selected

# A workaround

Developers get around this by creating an iOS framework which includes WatchOS source-code, then unit-testing that framework. This mostly works, but it's an extra target to maintain, and gets messy when there are API differences between WatchOS and iOS.

# A plea

Apple loves code-quality and unit-testing as much as I do.
Would you kindly consider allowing us to unit-test WatchOS targets?
It doesn't need to run tests on Watch hardware - I'd be happy to run a small test-suite on the Watch simulator.


Dupe of 21395998

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!