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

Proxy methodSignatureForSelector: ignore implemented protocols #49

Open
tux-mind opened this issue Apr 11, 2022 · 0 comments
Open

Proxy methodSignatureForSelector: ignore implemented protocols #49

tux-mind opened this issue Apr 11, 2022 · 0 comments

Comments

@tux-mind
Copy link

I was wondering if registering a proxy that implements a protocol that the target does not would incur some troubles.
It seems that the methodSignatureForSelector: is forwarded to the target, the implemented protocols are not used to look up the method signature.

return this.data.target.methodSignatureForSelector_(sel);

I find this helpful if you want to proxy a delegate that implements a protocol out of many others you might want to intercept.
e.g. the proxy implements NSURLSessionDataDelegate in addition to the target's only protocol NSURLSessionTaskDelegate.

Do you think that is a good idea to look up the method signature in the protocols as well?

Thank you again for this amazing framework!

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

No branches or pull requests

1 participant