2

How can you view the full API for a class including any defined extensions?

If you open the class in Xcode and view the method list in the quick jump bar it doesn't include any methods defined in any existing extensions for that class.

Ie: You define class A, then someone on your team creates an extension on class A with some additional methods. How can you easily see all the methods now defined on class A including those in the extension.

Marcus Leon
  • 55,199
  • 118
  • 297
  • 429
  • What class are we talking about? – matt Apr 03 '16 at 13:46
  • Any class really. A general question about how to view all methods defined on a class including extensions. – Marcus Leon Apr 03 '16 at 13:50
  • Okay, so you refuse to provide a real example of what you want. You don't actually want help — you're just complaining? – matt Apr 03 '16 at 13:51
  • Right, but you see this is the first time you've said this is a class that _you_ define. It makes a difference. – matt Apr 03 '16 at 14:14

1 Answers1

1

I would say offhand that there's no good way to do it. You'd think that the Symbol Navigator would be the way, but it seems to know nothing of Swift extensions (as opposed to Objective-C categories, which it does know about). Being created entirely with the Objective-C family of languages in mind, Xcode has not yet caught up with the existence and nature of Swift.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • 1
    i'd recommend making a simple demonstration project and filing a bug report with Apple: http://bugreport.apple.com – matt Apr 03 '16 at 14:23
  • Thanks for the answer. So I follow - is the answer different if it's someone else's api? Ie: I'm looking the Alamofire Request class (configured via CocoaPods) and am looking to see the full API including the extensions in the ResponseSerialization.swift file. Is the answer here the same (not possible)? I assume it is... – Marcus Leon Apr 03 '16 at 14:36
  • A less-then-ideal workaround I found was to search for "extension " when I have access to the source code... – Alpár May 04 '22 at 12:08
  • 2023 and no change on this? – Peter Lapisu Jan 09 '23 at 15:02