I defined a NS_ENUM below in another file:
typedef NS_ENUM (NSUInteger, LinkPlatformType){
LinkPlatformTypeEmail = 1,
LinkPlatformTypeFacebook,
LinkPlatformTypeGoogle
};
When I try to do a switch case:
- (void)linkWithType:(LinkPlatformType)linkType {
switch (linkType) {
case LinkPlatformTypeGoogle:
break;
case LinkPlatformTypeFacebook:
break;
default:
break;
}
}
I am getting a build error: Reference to LinkPlatformTypeGoogle is ambiguous
. Reference to LinkPlatformTypeFacebook is ambiguous
.
Updates:
The file defines.h which i defined the enum is in for example Target 1, And there is a Class StoreClass which import this defines.h file. And the StoreClass.m Target Membership I have set as multiple targets: Target 1 and Target 2. So after I do this, the Reference to LinkPlatformTypeFacebook is ambiguous
appeared. Will this be the reason?
Changing the import from
#import "SwipeView.h"
to
@import SwipeView;
worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With