I have an iOS app that uses SDK "Foo" and SDK "Bar". SDK "Foo" allows me to set a delegate that responces to
-(void)request:(Foo *)request didFailWithError:(NSError *)error
and "Bar" allows the same:
-(void)request:(Bar *)request didFailWithError:(NSError *)error
I have a class that wants to be a delegate for both SDKs:
@interface MyApp : NSObject<FooDelegate, BarDelegate>
@interface MyApp
-(void)request:(Foo *)request didFailWithError:(NSError *)error
{
NSLog(@"Foo failed");
}
-(void)request:(Bar *)request didFailWithError:(NSError *)error
{
NSLog(@"Bar failed");
}
and compiler blames me for "Duplicate declaration of method 'request:didFailWithError:'"
How do I fix it?