I'm quite familiar with the workings of Xcode, except for Build Targets.
I need to add a special Build Target for handling notifications, containing a class used to process the notifications (call this Class B
). Inside of this target, I access a method from a class located in the main build target (call this Class A
)
The issue is that I cannot add the Class A
's method to be a part of Class B
's, since doing so causes tons of Cannot find Type in Scope
errors from ever classes referenced inside of Class A
that has not been added to the build target .
How can I avoid these errors?
In this case you can select class A for both the target, and then create a extension for the methods which are only related to particular target, let's say you have 2 targets X and Y and you have 2 class A and B, class A belongs target X and class B blongs to target Y then if you want some of the factions of class A in in target Y then you need to select class A for both the target from side panel and then can access that in both the target and if there are some methods which you only want for target X and the you can create extension of class A(individual file) and assign that to respective target only(i.e target X)