I have created a sample objective c framework in Xcode where I also created a swift file. This is the navigation controller showing one swift file and another objective c class (NewFramework).
When I try to build documentation for the framework, I will only get documentation for the swift file and not for the objective c class. Here is the ObjcTemp.h file contents:
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ObjcTemp : NSObject
@property int val;
-(void)printHello;
@end
NS_ASSUME_NONNULL_END
And here is the ObjcTemp.m file contents:
#import "ObjcTemp.h"
@implementation ObjcTemp
-(void)printHello{
printf("Hello World!");
}
@end
I used default xcode 13 documentation tool (DocC).
The resulting generated documentation archive is like below: .
I want to generate complete documentation both for objective c and swift files using Default Xcode documentation tool. How can I do that ?
DocC in Xcode 13 is only able to build documentation for Swift code.
Support for building documentation for Objective-C code was added in Xcode 14:
Documentation
New Features
- Swift-DocC in Xcode now supports writing and building documentation for Objective-C and C APIs