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

Handle NSObjectProtocol requirements #109

Closed
kdawgwilk opened this issue Feb 13, 2018 · 2 comments
Closed

Handle NSObjectProtocol requirements #109

kdawgwilk opened this issue Feb 13, 2018 · 2 comments
Labels

Comments

@kdawgwilk
Copy link

SwiftyMocky does not currently handle the case for a protocol that inherits a requirement of NSObjectProcol. The derived mock needs to be a subclass of NSObject for this to compile.

@amichnia
Copy link
Collaborator

amichnia commented Feb 13, 2018

@kdawgwilk thanks for info, have you tried adding 'ObjcProtocol' annotation?

//sourcery: AutoMockable
//sourcery: ObjcProtocol
@objc protocol NonSwiftProtocol {
  // ...
}

It should make generated mock inheriting from NSObject.

Maybe we should emphasise it in docs a little bit more, full setup guide

@kdawgwilk
Copy link
Author

Ah, I didn't catch that! Thanks for pointing it out 👍

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

No branches or pull requests

2 participants