我有一个现有的应用程序,其中一些库与cocoapod链接。现在我想为它构建一个Apple Watch扩展。 当我刚刚添加WatchKit扩展目标时,一切都很顺利。但是,如果我尝试在我的应用程序中创建一个辅助函数(由watch app调用)。即便是非常样本:
Helper.h
+(void)test;
Helper.m
+(void)test{
}
和watchkit的interfacecontroller:
- (void)willActivate {
[super willActivate];
[Helper test];
}
,它显示以下错误:
ld: warning: directory not found for option '-L/Users/user/Development/@IOS/myApp/Pods/build/Debug-iphoneos'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Helper", referenced from:
objc-class-ref in InterfaceController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
是否与cocoaPod设置相关?