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:
Thank you,
Ram.
Please refer the apple documentation here:
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.
Objective-C is an object-oriented programming language used by Apple since the 90.
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.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With