There is also a case where you simply use two libraries that define protocols with methods that have the same name as a match, so you cannot change them.
In this case, you will need to create two classes, each of which implements each protocol, say ClassA for ProA and ClassB for ProB , and then pass your instance of ClassAB for each of them.
When ClassA receives a call from testingMethod you call a call to the ClassAB method, for example classAB testingMethodA .
If this is not clear, tell me and I am writing an implementation.
source share