title: Can Swift Method Defined on Extensions on Protocols Accessed in Objective-c
body: <p>Is it possible to call methods defined in a protocol extension in Swift from Objective-C?</p>
  
  <p>For example:</p>
  
  <pre><code>protocol Product {
      var price:Int { get }
      var priceString:String { get }
  }
  
  extension Product {
      var priceString:String {
          get {
              return "$\(price)"
          }
      }
  }
  
  class IceCream : Product {
      var price:Int {
          get {
              return 2
          }
      }
  }
  </code></pre>
  
  <p>The price string of an instance of <code>IceCream</code> is '$2' and can be accessed in Swift, however the method is not visible in Objective-C. The compiler throws the error 'No visible @interface for 'IceCream' declares the selector ...'.</p>
  
  <p>In my configuration, if the method is defined directly in the Swift object's implementation, everything works as expected. i.e.:</p>
  
  <pre><code>protocol Product {
      var price:Int { get }
      var priceString:String { get }
  }
  
  class IceCream : Product {
      var price:Int {
          get {
              return 2
          }
      }
      var priceString:String {
          get {
              return "$\(price)"
          }
      }
  }
  </code></pre>