How to detect from which app or SDK method swizzling is called

Hi Team,


I am using method swizzling to detect user event in my library but when I am using a third party library and if it's calling the same method which I swizzled in our library, our lib swizzling method is called, here I am unable to differentiate from where it is called.

I need to identify which app or SDK call the method swizzling.


Please help.

If I understand how swizzling works, it changes the method in a class.


So I do not see how you could differentiate. I am not surprised of such side effect of swizzling, which is a bit risky in general.


Maybe you could subclass for your library and swizzle for this subclass ?


Read this interesting article on the topic

h ttp://kostiakoval.github.io/posts/methods-swizzling-in-swift

How to detect from which app or SDK method swizzling is called
 
 
Q