Rocotilos Rocotilos - 1 month ago 6
iOS Question

Working with Multiple Targets in XCode

I am having a single project file. Then I created another target for a

"Lite"
version. I changed the bundle ID and product name for each target and am able to continue working this way.

But when I added a new custom class to the project, I try to use the class in existing VC by
#import "NewClass.h"
but it only works on one target, on the Lite target, it says
"File not found"
.

Why is this and how to solve it?

Answer

While adding any new file and if you are working on multiple targets and you want that file in both the targets then you need to check both the targets while adding file

Check screenshot

enter image description here