首先,把官网提供的demo文件,转化.famework类型的。
# Clone the project
$ git clone git@github.com:aliyun/aliyun-oss-ios-sdk.git
# Enter the directory
$ cd aliyun-oss-ios-sdk
# Run the packaging script
$ sh ./buildFramework.sh
# Enter the generated packaging directory where the AliyunOSSiOS.framework will be generated
$ cd Products && ls
加入框架后,有可能会出现以下的错误:
Undefined symbols for architecture arm64:
"_res_9_getservers", referenced from:
-[OSSIPv6Adapter getDNSServersIpStack] in AliyunOSSiOS(OSSIPv6Adapter.o)
"_res_9_ninit", referenced from:
-[OSSIPv6Adapter getDNSServersIpStack] in
AliyunOSSiOS(OSSIPv6Adapter.o)
"_res_9_ninit", referenced from:
-[OSSIPv6Adapter getDNSServersIpStack] in AliyunOSSiOS(OSSIPv6Adapter.o)
"_res_9_ndestroy", referenced from:
-[OSSIPv6Adapter getDNSServersIpStack] in AliyunOSSiOS(OSSIPv6Adapter.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决办法:
在 libraries 中添加libresolv.tbd
网友评论