对极光SDK的包装时,需要添加libresolv.tbd系统库,否则会报如下错误。在demo工程中添加libresolv.tbd,可以解决。
错误信息:
Undefined symbols for architecture arm64:
\"_dns_parse_resource_record\", referenced from:
-[JCORESRVResolver processRecord:length:] in YSJGPushPlugin(JCORESRVResolver.o)
-[JPushExtensionSRVResolver processRecord:length:] in YSJGPushPlugin(JPushExtensionSRVResolver.o)
\"_dns_free_resource_record\", referenced from:
-[JCORESRVResolver processRecord:length:] in YSJGPushPlugin(JCORESRVResolver.o)
-[JPushExtensionSRVResolver processRecord:length:] in YSJGPushPlugin(JPushExtensionSRVResolver.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
但云打包时,已经将libresolv.tbd添加到package.json中了,依旧报错,求大神们指点一下。package.json内容如下:
"_dp_nativeplugin": {
"ios": {
"plugins": [{
"type": "module",
"name": "YSJGPush",
"class": "YSJGPushModule"
}],
"integrateType": "framework",
"hooksClass": "YSJGPushProxy",
"framework": ["libresolv.tbd","CoreFoundation.framework","CoreTelephony.framework","SystemConfiguration.framework","CoreGraphics.framework","Foundation.framework","Security.framework","UserNotifications.framework","CFNetwork.framework"],
"capabilities": {
"entitlements": {
"aps-environment":"development"
},
"plists": {
"Required background modes":["App downloads content in response to push notifications"]
}
},
"plists": {
"YSJGPushAppKey":"caa1bbe94b7466a618a4b61d"
},
"deployementTarget": "8.0"
}
}
r***@icloud.com (作者)
弱智错误!感谢大佬纠正!
2019-07-01 12:43