Cocoapods: Podfile.lock SPEC CHECKSUMS sometimes contains quotes

Created on 29 Jun 2016  路  11Comments  路  Source: CocoaPods/CocoaPods

Having opposite diffs with some colleagues after pod install:

-  PINCache: '078426d356ab95ef875e9e62e5c35a2ea3333c28'
+  PINCache: 078426d356ab95ef875e9e62e5c35a2ea3333c28

and:

-  PINCache: 078426d356ab95ef875e9e62e5c35a2ea3333c28
+  PINCache: '078426d356ab95ef875e9e62e5c35a2ea3333c28'

We are all using CocoaPods 1.0.1. What does this quotes means?

Most helpful comment

In our case we have a Gemfile like this:

source 'https://rubygems.org'

gem 'cocoapods', '1.2.0'
gem 'psych'

And then when you bundle install you will check in your Gemfile and Gemfile.lock. Then instead of pod install you need to run bundle exec pod install. The version of psych will be locked in the Gemfile.lock and will be the same for all users.

See the link from @orta for more details.

All 11 comments

I think this is a dupe of https://github.com/CocoaPods/CocoaPods/issues/3452 - you have different versions of Ruby ( and psyche ) between colleagues.

@orta I have the same problem here and we all have the same version of Ruby. So It's not the source of the problem. We're using CocoaPods version 1.1.1

We synced psych gem version. We produce the same result now. Strange is that old pods are without quotes new pods are quoted:
KIF: '082eb65279e51c3092923802849eb796a04982ab'
libextobjc: a650fc1bf489a3d3a9bc2e621efa3e1006fc5471

@stefan-sedlak thats because of first zero oh hash :)

@stefan-sedlak read this thread for answer why this will not be fixed: https://github.com/ruby/psych/issues/232

@k06a thanks, first zero made my day. I hope that psych will improve to quote hashes starting with 1 exclusively on 1st April.

We've fixed this by including the newest version of psych in our Gemfile. This way at least all team members have the version that quotes and we don't conflict with each other.

@keith mind sharing a sample of what this looks like in a project using cocoapods?

Psyche is a ruby gem, you would need to learn how to use a Gemfile to make it work with CocoaPods.

In our case we have a Gemfile like this:

source 'https://rubygems.org'

gem 'cocoapods', '1.2.0'
gem 'psych'

And then when you bundle install you will check in your Gemfile and Gemfile.lock. Then instead of pod install you need to run bundle exec pod install. The version of psych will be locked in the Gemfile.lock and will be the same for all users.

See the link from @orta for more details.

Is it possible for Cocoapods to specify the version of psych that it uses?

Was this page helpful?
0 / 5 - 0 ratings