(1)调用pod spec lint 时报了如下错误:
- ERROR | [iOS] unknown: Encountered an unknown error (The 'Pods-App' target has transitive dependencies that include statically linked binaries:
解决方案:
这个错误是因为依赖库(s.dependency)包含了.a静态库造成的。虽然这并不影响Pod的使用,但是验证是无法通过的。可以通过 --use-libraries 来让验证通过。
这种情况下使用 --use-libraries 虽然不会出现错误,但是有时候会带来一些警告,警告同样是无法通过验证的。这时可以用 --allow-warnings 来允许警告。
(2)调用pod lib lint --verbose --use-libraries时报了如下错误:
Ld .../Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/Binary/App normal arm64
解决方案:
在 podspec 文件中添加 s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7 arm64' }
,如果项目已经设置 pod_target_xcconfig
,添加到已有值的后面。