我正在构建一个trigger.io原生模块,并通过手动将头文件和实现文件添加到ForgeModule项目中来包含AFNetworking 2.0框架。
AFNetworking 2.0 indicates是ios 6.0+的目标要求。
在xcode中,我将UniversalForgeModule的部署目标更改为6.0。
然而,在我的应用程序中包含了这个新打包的本机模块后,我在构建它时得到了以下错误:
Ld build/Release-iphonesimulator/ForgeInspector.app/Forge normal i386
cd /var/folders/xw/34h86n3d5p54qpq1wfc8ff600000b1/T/tmp5z_JZJ/ios/app
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0.1..。
Undefined symbols for architecture i386:
_UTTypeCopyPreferredTagWithClass", referenced from:
-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in frisbees.a(AFURLRequestSerialization.o)
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in frisbees.a(AFURLRequestSerialization.o)
"_kUTTagClassFilenameExtension", referenced from:
-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in frisbees.a(AFURLRequestSerialization.o)
"_kUTTagClassMIMEType", referenced from:
-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in frisbees.a(AFURLRequestSerialization.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Release-iphonesimulator/ForgeInspector.app/Forge normal i386
(1 failure)看起来我的构建目标仍然是5.0.1。我该如何改变这一点呢?
完整日志可用here。
谢谢!
发布于 2014-05-02 02:37:34
AFNetworking 2.0似乎引用了苹果的框架: MobileCoreServices.framework。
要将苹果框架包含到您的模块中,您需要通过添加一个add_ios_system_framework构建步骤来构建Change build configuration。
步骤:
build_steps.json文件添加到模块目录下的ios文件夹。{ "do":{ "add_ios_system_framework":{ "framework":"MobileCoreServices.framework“}
https://stackoverflow.com/questions/23412125
复制相似问题