How to create a new target with an updated version of a class

Ive created a multi-target project. One target is a dev version and has a testing interface. The second target is the production app. I wish to create a class "deviceController" in the target version which is a more developed version of "deviceController" in the dev version.

eg
Testing/
..............DeviceController.h
..............DeviceController.m
..............Device.h
..............Device.m
Prod
..............DeviceController.h
..............DeviceController.m


I added the testing class files (.m) in the build phase and put in the production DeviceController.m instead of the testing one.

When I build I get "Duplicate interface definition for class " as it seems the #import "DeviceController.h" in my new version pulls in the testing "DeviceController.h"

How can I make sure that Xcode only compiles the code that is listed in the Compile sources phase ?

I have found a few solutions online but had no success.

Im using Xcode 9.2

Ive tried specifying header search paths and not using header_maps but not finding a combination that works.
How to create a new target with an updated version of a class
 
 
Q