XCode - Same classe name, two targets

I'm trying to regroup several applications I have in the same XCode project. So I created a new XCode project and added two targets, and import the source code of my two apps in one of the targets.

The problem is that I have classes with the same name in the two applications. When I compile the first one, no problem. But if I try to compile the second target, I have lots of issues like this :

In file included from /Users/administrateur/Documents/Merged_iPhone_Projects/Target2/Classes/VisitFormViewController.m:18:
In file included from /Users/administrateur/Documents/Merged_iPhone_Projects/Target1/Classes/VisitFormDetailsViewController.h:11:

/Users/administrateur/Documents/Merged_iPhone_Projects/Target1/Classes/RoundedCornersTableViewCell.h:18:61: error: property has a previous declaration
@property (nonatomic, readonly) BkCustomCellBackgroundView *roundedCornersView;
                                                            ^
Target2/Classes/RoundedCornersTableViewCell.h:18:61: note: property declared here
@property (nonatomic, readonly) BkCustomCellBackgroundView *roundedCornersView;

I try to google it and found that setting the "Header Search Paths" to $(SRCROOT)/Target1 (or $(SRCROOT)/Target2), should solve my problem, but this is not working.

Anybody has an other solution?

FYI, I'm using XCode v.4.4.1

Thanks

Answers


You should arrange the resources for each target by directory and define the target membership in the file inspector.

Also, for each target you can use a "user build setting" that is undocumented:

USE_HEADERMAP = NO

and set in each target "User Header Search Path" variable to the the headers directory location.

For more information and more detailed explanation, please refer to this question and answer in stackoverflow

controlling which project header file Xcode will include


Need Your Help

Two differents OnClick on two divs, one over the other

javascript onclick html

I have two divs, a big one and a smaller over the other, each div has its own OnClick method. The problem I have is when I clicked the smaller div, the big div's OnClick method is called too.

google analytics pageview for ajax website

javascript jquery ajax google-analytics

Does google analytics counts the pageviews if the url of the page changes by javascript?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.