Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing an imported library using cocoapods

I am working on a project using cocoapods and suddenly I see myself doing some changes in one of the libraries. How can I ensure that those changes will never be override by a pod update? Is there any way to introduce changes in a pod without updating the github project?

UPDATE : Forking a project

I have tried to fork the project and create a new specfile to point to the new project. I was able to install the basic stuff, however, for some reason, there are some dependencies that are installed but can't be referenced inside the pods project. Currently I have this in my podsfile:

'WhirlyGlobe', :podspec => 'https://raw.github.com/tiagoalmeida/WhirlyGlobe/master/WhirlyGlobe.podspec' 

The fork of the library is in https://github.com/tiagoalmeida/WhirlyGlobe

UPDATE2: Missing Headers

I have found that the headers (Pods/Headers) for boost and Eigen (used from the WhrilyGlobe) are not being generated.

UPDATE3: Trying to do Something about the headers

I have tried to look in some of the configurations that are in this thread and I have tried the solutions in the FAQ but I believe that my problem is different. The headers are actually missing.

UPDATE4: Attacking the cocoapods version

I have uninstalled cocoapods and installed the version 0.20.2 (that was working before trying to use my fork) and it keeps all the same :/.

like image 446
Tiago Almeida Avatar asked Jul 04 '13 11:07

Tiago Almeida


1 Answers

@pgb and wattson provided me good information but ultimately the problem was in a combination of things.

I don't know why but it seems that cocoapods 0.22 handles headers differently. I uninstalled cocoapods and installed the version 0.20.2.

To check the version of cocoapods I have used gem query and I have removed the cocoapods with gem uninstall cocoapods and installed the cocoapods with gem install cocoapods --version 0.20.2.

I have used my podfile like this:

'WhirlyGlobe', :podspec => 'https://raw.github.com/tiagoalmeida/WhirlyGlobe/master/WhirlyGlobe.podspec' 

Where podspec points to my new podspec. I made like this because I need to remove the :tag from the original podfile (otherwise it always points to the same spot) and this way I have more control over the file.

In the podspec I have changed the source:

s.source = { :git => "https://github.com/tiagoalmeida/WhirlyGlobe.git"}  

To point into my fork and removed the tag.

Thanks @pgb and @wattson for the attempts to help me. Upvoted both because they were both usefull.

like image 131
Tiago Almeida Avatar answered Sep 19 '22 17:09

Tiago Almeida