简体   繁体   中英

cocoapods - edit development pod's source file

I have a question regarding cocoapods' development pod.

I find a source file in 'development pod' which contains a bug that I need to fix. I know how to change the codes to fix it, but I am not quite sure how to fix/patch the file itself so that when I redo pod install later, it sustains the changes I made.

After some research, I figured out that I can fix/patch pod file by using https://github.com/jpsim/pod-diffs/blob/master/README.md

However, the file I like to fix resides in Development Pods.

According to https://guides.cocoapods.org/making/using-pod-lib-create ,

Development Pods are different from normal CocoaPods in that they are symlinked files, so making edits to them will change the original files, so you can work on your library from inside Xcode.

Does this mean I can safely make modifications in the file itself to fix the bug? Sorry, I am not familiar with fixing Pod files. Any help will be appreciated.

Yes, this would work. When using a development pod, running pod install will not overwrite your changes with whatever is in the pod's repo, but instead will use the code as specified in the :path of your development pod.

When you do this, you should a) put the development pod under your own version control (usually in a fork of the original pod), and b) consider offering your fixes upstream via a pull request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM