I have two apps which share a lot of source, so I want to put them into one Xcode project and use Targets to build them seperately. Some of the source files have the same name in both projects (for example, MapViewController.h
and MapViewController.m
). I thought as an intermediate step, I'd just put the whole classes folder into the merged project (with a different folder name) and use Targets to specify which classes folder to use, then later I'd properly merge what I could into common source files.
The problem I found is that I can't include .h
files in a Target (the option is greyed out). Do I need to use the same interface file for both Targets and have two versions of the implementation files. Is there a better way to do this? Thanks.