14

I am a beginner in using pods in Xcode projects. I have been confused by Podfile.lock. I want to update a framework "OBJECTMAPPER" to 2.0 to make it compatible with Swift 3. However it doesn't.

1

Why doesn't it update to the latest version (2.0)? Does it have anything to do with Podfile.lock? Which is as follows ->

2

and why is it used?


Update: The Podfile

3

Francesco - FL
  • 603
  • 1
  • 4
  • 25
Jeesson_7
  • 761
  • 1
  • 11
  • 38

2 Answers2

4

Just In case any one is wondering the same i did 2 years ago. I will tell a small description. When u install a library with cocoapods you will be generated a podlock against it with the version which it(The library) is installed. For example suppose you have library named "XX" and you install it with pods. if the latest version of "XX" is 2.0.0, then u will be installed the latest version and podfile.lock is locked with -(XX - (2.0.0))

Suppose if a new version is released of that library and u dont want it's updates to be installed in our project then use pod install.. This will only install any new library in podfile and will not affect your existing library by updating them to latest code.("This prevents some functions of that library which you have used to not disappear if they have depricated it").This is monitored by podfile.lock

If you want to update "XX" to a newer version in future use pod update for that library

Jeesson_7
  • 761
  • 1
  • 11
  • 38
2

pod install will not update ObjectMapper to the latest version because there is no reason for it to do so. ObjectMapper is included as a dependency to UberRides and version 1.5.0 satisfies the requirement which is 1 or above.

In order to force an update you can add ObjectMapper to the podfile with the required version, e.g.

pod 'ObjectMapper', '2.0'
mlidal
  • 1,111
  • 14
  • 27