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?
You need to add the file to both the Target, so it can be accessed.
Click on the file you have added and then go to the Utilities Area
in the right and click on File Inspector
. You will have section called 'Target Membership', please select the target from the list of Targets.
Alternatively approach : Select the Target in which you are getting error then got to Build Phases -> Compile Sources and make sure the file is present there.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.