I have been using method swizzling to swap implementations for unit testing. However, I am concerned that if the production code's method signatures change due to parameter changes, the unit tests will compile without error and testing run-time behavior could be unstable.
So, is there any compile-time or even run-time way to confirm that the signatures of two Objective-C methods are the same?
As long as you have set up your unit tests such that the code is written as if you are calling an instance of the real class using its real interface, then a change in signature should be caught at compile time.
You could grub thru the runtime and get a hold of the method signatures and then compare the elements of said signatures for compatibility, but that won't catch all changes (for example, all parameters that accept objects are encoded as '@').