Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C and Swift Documentation together like Apple documentation [closed]

I am currently working on building iOS SDK, written in Objective-C. Now that I have SDK tested and ready, would wanted to add Documentation to it combining Swift and Objective-C. I have worked on following Doc generator tools

a. Doxygen

b. AppleDoc

c. Jazzy

d. Apple’s HeaderDoc.

I would like to use the comments in my objective-c header file and generate combined help for Objective C and Swift similar to how Apple has been doing recently. My question is how do I generate the documentation for Swift and Objective-C from Objective-C headers?

Here are some links based on my research:

  • https://github.com/realm/jazzy/issues/353
  • https://github.com/jpsim/SourceKitten/pull/95

Thank you,

Ram.

Please refer the apple documentation here:

image

like image 763
Ram Avatar asked Dec 02 '15 11:12

Ram


People also ask

Can you mix Objective-C and Swift?

You can use Objective-C and Swift files together in a single project, no matter which language the project used originally. This makes creating mixed-language app and framework targets as straightforward as creating an app or framework target written in a single language.

Does Apple use Swift or Objective-C?

Objective-C is an object-oriented programming language used by Apple since the 90.

Is Objective-C still used for iOS development?

Objective-C is so pervasive in iOS that it's impossible to completely remove it. Apple continues to maintain libraries written in Objective-C, so we should expect Objective-C to be treated as a (mostly) first class language in iOS. At other companies, legacy code remains.

Can I use Swift library in Objective-C?

The Swift library cannot be directly called from Objective-C, since it is missing the required annotations in the code, and in many cases, modules do not inherit from NSObject, rather they use the native Swift data types.


1 Answers

Maybe not (yet) exactly what you are looking for, but you can use Swiftify (https://objectivec2swift.com/) service to convert declarations from Objective-C to Swift.

Furthermore, if above documentation tools allow to develop any sort of a plugin to integrate with, it should be possible to automatically generate Swift sources using our Web API.

We may be willing to develop such an integration if there will be a demand for it.

Disclaimer: I am the author of Swiftify :)

like image 199
Crulex Avatar answered Oct 21 '22 11:10

Crulex