I meet this error when I do a unit test on xcode. I try to import "SignIn.h" and test the VerifyEmail class which is defined in SignIn.h/SignIn.m.
My code is as follows:
#import <XCTest/XCTest.h>
#import "SignIn.h"
@interface SignInTests : XCTestCase
@property (nonatomic) VerifyEmail* verifyEmail;
@end
@implementation SignInTests
- (void)testVerifyEmail
{
_verifyEmail = [[VerifyEmail alloc] init];
}
...
I just follow the usual unit test pipeline. import "SignIn.h" and @property (nonatomic) VerifyEmail* verifyEmail are okay, but when I try to initialize verifyEmail (_verifyEmail = [[VerifyEmail alloc] init];) there is an error as below:
ld: warning: directory not found for option '-Llibs/Debug-iphonesimulator'
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_VerifyEmail", referenced from:
objc-class-ref in SignInTests.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have been working on this for a long time and really need someone to help. Thanks!