自建Framework 中使用第三方Framework,且不在主工程中添加第三方Framework

自建Framework 中使用第三方Framework,且不在主工程中添加第三方Framework

以图片为例。自建了Wormhole_SDK,在其中需要使用RxSwift、SnapKit、Moya等
且不想在主工程 ModelDisplay 逐个引入 这些第三方Framework

我们需要把第三方的Framework的Mach-O Type 调成 Static Library

自建了Wormhole_SDK,Mach-O Type 调成Dynamic Library

这样生成的自建的Framework,就包含第三方Framework

如果添加Rxswift 想添加RxMoya 就会出现 下面报错

<div><br class="Apple-interchange-newline">RxMoya/Single+Response.swift:2:8: Compiling for iOS 10.0, but module 'RxSwift' has a minimum deployment target of iOS 11.0: /Users/mc/Library/Developer/Xcode/DerivedData/ElfDisplay-erpppbfqznzbmmgazargffsndhpm/Build/Products/Debug-iphoneos/RxSwift.framework/Modules/RxSwift.swiftmodule/arm64-apple-ios.swiftmodule</div>

RxMoya/Single+Response.swift:2:8: Compiling for iOS 10.0, but module 'RxSwift' has a minimum deployment target of iOS 11.0: /Users/mc/Library/Developer/Xcode/DerivedData/ElfDisplay-erpppbfqznzbmmgazargffsndhpm/Build/Products/Debug-iphoneos/RxSwift.framework/Modules/RxSwift.swiftmodule/arm64-apple-ios.swiftmodule

需要在 下图中做出修改

下图中 没用

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容