解决多个SDK, 构建时使用相同SDK的不同版本, 导致Pods引用报错的问题.

Link Binary With Libraries 大家都不陌生, 他的 Status 有两种状态 Required or Optional, 下面为官方的解释.

Libraries and frameworks are designated as Required by default, but you can change this designation to Optional. Required libraries must be present on the host computer for the product to load. Optional libraries do not have to be present for the product to load. A Required framework will always be loaded into memory, but an Optional framework will be loaded only if needed. The initial load of the application will be faster if a large library that is never needed is designated as Optional.

这次的问题出现在, 我使用了两个不同的SDK A和B, 他们分别调用了另一个SDK C的不同版本, 这导致Pods时出现了问题. 

点击 Pods -> Build Phases -> Link Binary With Libraries 找到了相关的SDK, 将Required => Optional, Optional后问题解决.

动态动态, 兼容兼容.

感谢阅读,学以致用更感谢。

猜你喜欢

转载自blog.csdn.net/siwen1990/article/details/127485673