realm / jazzy

Soulful docs for Swift & Objective-C
https://realm.io
MIT License
7.35k stars 413 forks source link

Jazzy didn't work on simple Category #5

Closed DmitrySeredinov closed 9 years ago

DmitrySeredinov commented 10 years ago

I'm trying to use Jazzy with the project, which uses CoreBluetooth Framework. And Jazzy unable to find CoreBluetooth/CoreBluetooth file. The command:

➜  CHCoreBluetooth git:(periodical_discovering) ✗ jazzy -i CHCoreBluetooth/ -o jazzydoc/
/Users/dals/Playground/ObjectiveC/CHFoundation/CHCoreBluetooth/CHCoreBluetooth/CBCharacteristic+CHCoreBluetooth.h:9:9: fatal error: 'CoreBluetooth/CoreBluetooth.h' file not found
/Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/lib/jazzy.rb:36:in `document': undefined method `xpath' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:44:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:43:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:43:in `<top (required)>'
    from /usr/bin/jazzy:23:in `load'
    from /usr/bin/jazzy:23:in `<main>'

Affected Category's Header:

#import <CoreBluetooth/CoreBluetooth.h>

@interface CBCharacteristic (CHCoreBluetooth)
- (BOOL)writable;
- (BOOL)readable;
- (BOOL)notificable;
- (NSString*)description;
@end

Thanks.

larslockefeer commented 10 years ago

I'm seeing similar issues when I try to run jazzy on my project. In my case, it's the AppDelegate that gives a problem:

➜  TestJazzy  jazzy -i ./ -o ~/Desktop/jazzy-docs 
/Users/Lars/Projects/TestJazzy/Classes/Application/TJAppDelegate.h:9:9: fatal error: 'UIKit/UIKit.h' file not found
/Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/lib/jazzy.rb:36:in `document': undefined method `xpath' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:44:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:43:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.0.3/bin/jazzy:43:in `<top (required)>'
    from /usr/bin/jazzy:23:in `load'
    from /usr/bin/jazzy:23:in `<main>'

The affected file:

#import <UIKit/UIKit.h>

@interface TJAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
jpsim commented 10 years ago

Thanks for opening a ticket about this!

jazzy currently only supports fairly basic projects such as the .h/.m files in parser/ASTDump.

We'll be adding support for a much wider variety of projects soon. Stay tuned!

jpsim commented 9 years ago

Hi @DmitrySeredinov and @larslockefeer, as of v0.0.5 jazzy now only supports Swift projects, but we do plan on adding Objective-C support again soon. Therefore, I'm closing this issue as a duplicate of #56.