Remove dependency from pod

孤人 提交于 2019-12-10 17:48:36

问题


How do I remove dependency from a pod?

I have a podfile with

pod 'GData'

which seems to be broken, because it generates 163 duplicate symbols errors. I think I know what it is. While installing this can be observed:

Installing GTMHTTPFetcher (1.141)
Installing gtm-http-fetcher (1.0.141)

[!] GTMHTTPFetcher has been deprecated in favor of gtm-http-fetcher

One of these is not needed. So to remove it I try to modify podfile to use custom, local podspec file:

podspec :path => '~/GData.podspec.json'

In which podspec file I copy all of original JSON podspec contents without GTMHTTPFetcher, GData DOES not install. It even happens if I just copy original contentes and don't change anything at all. All dependencies are installed, but GData itself is not. I think that I'm missing something here.


回答1:


Here is proper podfile syntax for using custom podspec (in a JSON format):

pod 'pod_name_goes_here', :podspec => 'path/to/your/file.podspec.json'

And to delete dependency, simply remove an entry from 'dependencies', for example change

"dependencies": {
  "GTMHTTPFetcher": [
  ],
  "gtm-oauth2": [
  ]        
}

to

"dependencies": {
  "gtm-oauth2": [
  ]        
}

And now pod will be installed without "GTMHTTPFetcher".



来源:https://stackoverflow.com/questions/29595295/remove-dependency-from-pod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!