We have created two Targets (Target_One & Target_Two) for same project.
- Target_One contain SDK1 and delegate Target1SDKHelperDelegate
- Target_Two contain SDK2 and delegate Target2SDKHelperDelegate
The reason to create two target : we need to upload two apps with same UI but different SDK integration.
As we know, each SDK has their own delegates. So we want to apply delegates specific to the target.
Example: Target_One has a class named MyClass
class MyClass: NSObject, Target1SDKHelperDelegate {
}
In above class, we have implemented Target1SDKHelperDelegate delegate. We are using same class for Target_Two also and we want to use Target2SDKHelperDelegate for Target_Two.
So how we can put two different delegates to for two different targets?
We also know to manage target we should use below code.
#if Target_One
#else
#endif
But anyone tell us how to manage delegate by using above?
We want to do something like :
class MyClass: NSObject
#if Target_One
, Target1SDKHelperDelegate
#else
, Target2SDKHelperDelegate
#endif
{
}