Editing locked files from a CocoaPods framework
You can do this simple. Just modify the pods src code. Switch to another brach and switch back. Xcode would rebuild pods with your modified code.
If you want go back, you should remove the pod in Podfile, execute pod install
.Then add pod back, execute pod install
.
This solution is just for debug.
For permament, you should take @technerd 's answer
You can not make changes in Original Pod file. If you want to add some more features then you have to fork that particular repo.
Follow steps to do so :
- Find library you want to use on Git.
- Fork library.
- Update Podfile which refer to your forked version. Suppose I want to fork GPUImage Library. Then point your fork in Podfile as given.
pod 'GPUImage', :git => 'https://github.com/UserName/GPUImage.git'
- Make your changes.
- Commit/push your changes to your forked repo.
- Submit a pull request to the original author of Library.
- If pull request is accepted and the pod is updated, revert back your Podfile to use the public pod.
You can create Category (Objective C) or Extension (Swift) to extend or add some features to existing class.