修改工程名,pod报错ld: library not found for -lPods-XXXX

工程原名为CloudMall->XXX后

ld: library not found for -lPods-CloudMall

clang: error: linker command failed with exit code 1 (use -v to see invocation)

这样需要在Build Phases -> Link Binary With Libraries里删除libPods-CloudMall.a.


报错:xxx target has frameworks with conflicting names:xx.framework

在podfile中删除xx.framework的引用  pod install ,此时会removing掉原来的xx.framework,再重新添加,然后install。就可以了。


cocoapod私有库:

参考:http://www.jianshu.com/p/d6a592d6fced

在gitlab上创建了LXPodSpec仓库

1, pod repo add LXSpecs http://10.20.101.5/leix/LXPodSpec.git

执行后repos中多了LXSpecs文件夹(pod repo查看)

2,在桌面或文档中执行 pod lib create NCKFoundation(生成文件夹,包含demo,这个文件夹和远程code仓库匹配)

3,验证本地 pod lib lint --allow-warnings --verbose 本地验证成功

4,上传(pod lib create NCKFoundation创建的)工程文件到gitlab上的仓库中。并打tag与Specs文件中相同,修改source 为gitlab路径。

5,远程验证:pod spec lint --allow-warnings --verbose

6,在podspec所在目录执行: pod repo push LXSpecs NCKFoundation.podspec  --allow-warnings --verbose 本地文件夹和远程都有了NCKFoundation.podspec文件(注意pod中用了第三方,包含.a文件会报错:- ERROR | [iOS] Encountered an unknown error (The 'Pods' target has transitive dependencies that include static binaries: 需要添加参数--use-libraries)。

7,测试Example时要用pod install Example中的Podfile。


20170330更新(任意目录)自定义的指定仓库:pod repo update OkdeerSpecs(注意OkdeerSpecs本地的cocoaPods下repos中的自定义仓库)

如果某个库版本冲突,如友盟分析库,先在podfile中删掉,install后再添加重新install


自制pod库同事更新后,到了1.0.1版本,而自己本地还是1.0.0版本,那么更新项目工程代码后,podfile本地还是1.0.0。修改为1.0.1后,更新会因本地的repos中的自己仓库没有1.0.1版本,会报None of your spec sources contain a spec satisfying the dependency: `Okdeer-CommonLibrary (~> 0.0.17)`错误。在任意目录里执行:pod repo update OkdeerSpecs  就会更新OkdeerSpecs中的版本库,cd ~/.cocoapods/repos/OkdeerSpecs/ 查看就会有1.0.1版本了.

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

推荐阅读更多精彩内容