我的工程pod install后运行是正常的
工程对应的Xcode缓存文件DerivedData中 也生成了对应的.a文件
但是上传到git 我的同事下下来 pod install
结果DerivedData中并没有生成.a文件 只有一个xxx.app在
工程里自然这些.a都是红色的
run 自然也报错
之后我的DerivedData中的文件拷给他们 才解决的这个问题
请问有人知道这究竟是什么情况吗?
为什么pod不自动生成.a?
是pod设置问题吗?(pod已经更新到最新版,添加taobao源)
PS:之后他们上传工程,我这里也不会自动生成.a了
清除缓存之后 还要管他们再要 =。=
PS2:cocoapods这玩意也太难用了 和npm怎么比 =。=
cocoapods
It is indeed a useful tool. Of course, it also has its own shortcomings, but these shortcomings do not affect the enthusiasm of many developers to use it.I have never encountered the situation you mentioned, but I hope the following instructions can solve your problem.
Instructions on submitting several files and directories related to pod in the project to git:
Podfile needs to be uploaded, you know
Podfile.lock needs to be uploaded. This file records information and can help you determine whether dependent libraries need to be updated during compilation
Pods/ Ignore uploading, it can be automatically generated based on the Podfile file
*.xcworkspace needs to be uploaded
After team members update or download the project code, they should use the following command to update the dependent libraries:
Benefits of the above steps
If you install the method written above to configure your project, then when a team member modifies the library dependency, you don’t have to worry that he forgot to tell you that he has updated the dependent library, because
cocoapods
会根据Podfile.lock
文件和Pods/
目录对比,来确定你当前的依赖库是否是正确的版本。另外,如果需要更新,应该使用update
命令,而不是install
will be based onPodfile.lock file with the
Pods/
directory to determine whether your current dependent library is the correct version. In addition, if you need to update, you should use theupdate
command instead of theinstall
command to avoid errors