-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS Xcode] Unable to generate documentation for module header files (.h) defined in bridging header for ObjectiveC and swift mixed project. #1349
Comments
It looks like you need some more build flags to tell Clang where the headers are -- try reading around these notes. |
@johnfairh - Thanks for your quick response, I followed the link and tried the steps as stated.
After that i ran below Jazzy command, it executed successfully but not generated any documentation.
I also tried SourceKitten command to generate the ObjectiveC json file but no luck.
Could you please help us in generating the documentation for attached codebase. |
Here's what happens when I run the clang command you say works for you: ; clang -c -x objective-c -isysroot $(xcrun --show-sdk-path) -I $(pwd) Infinite/Infinite/Infinite.h -fmodules
Infinite/Infinite/Infinite.h:19:9: fatal error: 'Infinite/NSString+DateFormatter.h' file not found
#import <Infinite/NSString+DateFormatter.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...and I can see that the ; find . -name NSString+DateFormatter.h
./Infinite/Infinite/PublicAPI/NSString+DateFormatter.h So this is exactly the problem that the link I posted above describes -- you need to decide how you want to solve it. Then when you have the |
Hello @johnfairh, clang -c -x objective-c -isysroot $(xcrun --show-sdk-path) -I $(pwd) Infinite/Infinite/Infinite.h -fmodules As suggested above I tried same command with sourcekitten and im getting below error. Attached screenshot for reference. clang -c -x objective-c -isysroot $(xcrun --show-sdk-path) -I $(pwd) Infinite/Infinite/Infinite.h -fmodules
geethadevi@INCHEL-GXTG90HJ-7903 Modular % sourcekitten doc --objc $(pwd)/Infinite/Infinite/Infinite.h -- -x objective-c -isysroot $(xcrun --show-sdk-path) -I $(pwd) Infinite/Infinite/Infinite.h -fmodules
zsh: trace trap sourcekitten doc --objc $(pwd)/Infinite/Infinite/Infinite.h -- -x objective-c |
I think just a slight copy+paste mistake, the umbrella header file is appearing twice in the sourcekitten command which clang is not going to like. The command should be something like: sourcekitten doc --objc $(pwd)/Infinite/Infinite/Infinite.h -- -x objective-c -isysroot $(xcrun --show-sdk-path) -I $(pwd) -fmodules And check your very first comment - if your project is for iOS then you'll need to put back the |
@johnfairh Thanks a lot for your support. It's working fine and able to generate documentation successfully. |
Using below commands to generate the documentation for ObjectiveC and Swift mixed project.
sourcekitten doc -- -workspace Infinite.xcworkspace -scheme Infinite > swiftDoc.json
This command is generating swiftDoc.json successfully.
sourcekitten doc --objc$(pwd)/Infinite/Infinite/Infinite.h -- -x objective-c -isysroot $ (xcrun --show-sdk-path --sdk iphonesimulator) -I $(pwd) -fmodules > objcDoc.json
This command is unable to generate objcDoc.json file. It is giving the below error.
Error -
/Users/XXX/Downloads/Modular/Infinite/Infinite/Infinite.h:20:9: fatal error: 'Infinite/PropertyAnimatorViewController.h' file not found
/Users/XXX/Downloads/Modular/Infinite/Infinite/Infinite.h:20:9: error: 'Infinite/PropertyAnimatorViewController.h' file not found
#import <Infinite/PropertyAnimatorViewController.h>
^
:0: error: failed to import bridging header '/Users/XXX/Downloads/Modular/Infinite/Infinite/Infinite.h'
Sample Project attached.
Modular.zip
Kindly help us in resolving this issue, its little urgent.
The text was updated successfully, but these errors were encountered: