Cherif
Cherif

Reputation: 5383

XCode 6: The custom class and the several project targets

I would like to have both DEV & PROD versions of my app working on my iPhone at the same time.

So I created a new target AppNameDev with a different bundle identifier. When I launch the app on my iPhone, I get the error :

Unknown class _TtC4Wesh10InviteCell in Interface Builder file.

My custom class InviteCell is not found by the new target's interface builder. How to tell it where to find the class ?

Upvotes: 0

Views: 116

Answers (2)

hightech
hightech

Reputation: 3760

You need to click "InviteCell" class file from left side on Project Navigator and then go to "File Inspector" and click both targets (DEV & PROD) from Target Membership on the right side. I hope that helps you. For example:

enter image description here

Pro Tip: If you are planning to create a new file, make sure to select both DEV & PROD version targets before you click to "create" button. It will save you a lot of time because you don't have to go back and forth.

Upvotes: 1

Tapani
Tapani

Reputation: 3231

When you click the InviteCell source file check from the File Inspector on right that both targets are checked. Or that the file exists in Build Phases - Compile Sources for both targets.

Upvotes: 1

Related Questions