Skip to content
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

objc method produces multiple methods in generated swift interface but jazzy ignores some of them #1311

Open
gerchicovy opened this issue May 30, 2022 · 1 comment

Comments

@gerchicovy
Copy link

Example:

NS_ASSUME_NONNULL_BEGIN
typedef void(^SomeCompletion)(NSString * _Nullable str);

@interface SomeClass: NSObject
- (void)loadTokenWithCompletionHandler:(SomeCompletion)completionHandler;
@end
NS_ASSUME_NONNULL_END

Generated swift file:

public typealias SomeCompletion = (String?) -> Void

open class SomeClass : NSObject {
open func loadToken(completionHandler: @escaping SomeCompletion)
open func loadToken() async -> String?
}

Generated documentation contains description of open func loadToken() async -> String? only which is even less intuitive.

@johnfairh
Copy link
Collaborator

This is a Swift issue -- they give both methods the same 'unique' USR. It might be possible to work around in sourcekitten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants