You can't use +resolveInstanceMethod:
for that, but you can use traditional forwarding. +resolveInstanceMethod:
just installs a new instance method on the class using the Objective-C runtime. You don't get to affect how it is called. It will be called just like any other method with the arguments in the registers and on the stack as the caller supplied them. You don't get an opportunity to package or marshal the arguments.
If you implement -forwardInvocation:
and -methodSignatureForSelector:
, then you get an NSInvocation
object. That's already a packaging of the arguments (and return value). You can use that as it is or interrogate it to unpack the arguments and repack them how you want.