title: Swift Control access per targets
body: <p>Does any one know how to have different swift control access for different targets. Basically I have an iOS framework in swift with two targets A and B. I wanted a class say "Hello" as public in target A and internal in target B. One of the way to have this define a Swift flag and have something like this.</p>
  
  <pre><code>#if FLAG
  
  public class Hello {
  
  #else
  class Hello {
  
  #endif
  </code></pre>
  
  <p>Open brace with no closing brace in the same scope does compile in swift. One of the possible way to have the empty class under flag and put the rest in an extension. This is not a good solution since I need to make some of the functions also under flag to control the access. Is there any solution to control the access without duplicating the functions ?</p>
  
  <p>Or is the approach fundamentally wrong ? I need to have a wrapper for the class to make it public ?</p>