第一步:查看官方文档5+SDK集成,多看两遍。
第二步:跟着官方文档,进行集成。
第三步:运行之后,有可能会出现linker错误,基本都是由于 某些依赖库没有添加完。
现总结如下:
出现Linker错误:
Undefined symbols for architecture x86_64:
…<中间省略>
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
- 添加StoreKit.framework
Undefined symbols for architecture x86_64:
“OBJC_CLASS$_SKStoreProductViewController”, referenced from:
objc-class-ref in liblibPDRCore.a(DCH5ScreenAdvertising.o)
“_SKStoreProductParameterITunesItemIdentifier”, referenced from:
-[DCH5ScreenAdvertising touchesEnded:withEvent:] in liblibPDRCore.a(DCH5ScreenAdvertising.o)
- 添加 QuickLook.framework
Undefined symbols for architecture x86_64:
“OBJC_CLASS$_QLPreviewController”, referenced from:
objc-class-ref in liblibPDRCore.a(PGRuntime.o)
- 添加libc++.tbd(xcode10之前是libstdc++.tdb)
Undefined symbols for architecture x86_64:
“vtable for __cxxabiv1::__class_type_info”, referenced from:
typeinfo for tinyxml2::XMLNode in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLVisitor in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLAttribute in liblib