Set Target based Swift compiler flags to POD Framework

Viewed 77

I have 2 targets in my Xcode project (Test1 and Test2), I have set the Other Swift Flags -DTEST1 in target Test1.

if I run the below code in the via Test1 target, it prints "From Test1 target", if I run the code from Test2 target it prints "From Test2 target"

 #if TEST1 
      print("From Test1 target")
  #else
     print("From Test2 target")
  #endif

I like to do the same behaviour in the pod framework classes, if I use the above code in pod classes, it is not working, as pod framework doesn't understand the main target Other Swift Flags, it always prints the else statement, how do I achieve that in pod classes

0 Answers
Related