I found this Apple Support thread that might help, here is what the answer says:
I'm guessing it was because you have duplicate symbols. It is probably
something defined in a header file that should be in a source file
So here are several things that might be causing the issue:
- You are importing a
.m
file, only import .h
files
- If you have an
@implementation
in a header file, those only go in the implementation file.
- You might have a
.m
file that is included twice. Leave only one file reference.

You would be able to see them in the Build Phases, see image
- There might be a declaration above the
@Interface
in the .h
file, put it in the @Interface
- Declaring a constant or variable in different
.h
files with the same name.
Changing 'No Common Blocks' from Yes to No might help (under Targets->Build Settings->Apple LLVM - Code Generation)
This could happen also when you have the same @interface
in different files with different implementations. For example you have a Player class, in the Player.h/m
files and you have a Match class (Match.h/m
), and a match is between two player, but not the aforementioned Player.
Player.h
@interface Player : NSObject
@property (nonatomic) NSUInteger _id;
@property (nonatomic, strong) NSString* firstName;
@property (nonatomic, strong) NSString* lastName;
@property (nonatomic, strong) NSString* username;
@end
Match.h
@class Player
@interface Match : NSObject
@property (nonatomic, strong) Player* player1;
@property (nonatomic, strong) Player* player2;
@property (nonatomic) NSUInteger matchId;
@end
@interface Player : NSObject
@property (nonatomic, strong) NSString* nickName;
@property (nonatomic, strong) NSString* point;
@property (nonatomic, strong) NSNumber* lastMove;
@end
In this case the the compiler see two different Player class implementation. You need to refactor the Player class in the Match.h
file to MatchPlayer.