当我尝试在通过 phonegap 生成的 ios 项目中添加测试目标时,出现链接器错误。似乎无法找到我项目中的cordova项目(我认为),因此在我运行测试时它会引发错误。
我花了一段时间搜索,没有人有这个错误,甚至可以为cordova项目创建本机单元测试吗?- 只是为了澄清我正在为 cookie 使用一些本机代码并希望对其进行单元测试。
错误是:
Undefined symbols for architecture i386:
"_CGRectZero", referenced from:
+[CDVUserAgentUtil originalUserAgent] in libCordova.a(CDVUserAgentUtil.o)
"_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
objc-class-ref in libCordova.a(CDVURLProtocol.o)
"_OBJC_CLASS_$_CLLocation", referenced from:
l_OBJC_$_CATEGORY_CLLocation_$_JSONMethods in libCordova.a(CDVShared.o)
"_UTTypeCopyPreferredTagWithClass", referenced from:
___30-[CDVURLProtocol startLoading]_block_invoke in libCordova.a(CDVURLProtocol.o)
"_kUTTagClassMIMEType", referenced from:
___30-[CDVURLProtocol startLoading]_block_invoke in libCordova.a(CDVURLProtocol.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
任何帮助都是极好的!!!!谢谢。