{"id":16682312,"url":"https://github.com/jpsim/pod-diffs","last_synced_at":"2025-04-09T23:12:47.899Z","repository":{"id":14947789,"uuid":"17672431","full_name":"jpsim/pod-diffs","owner":"jpsim","description":"Guide and example for a neat way to modify pods using patchfiles","archived":false,"fork":false,"pushed_at":"2014-03-12T15:44:07.000Z","size":112,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T23:12:41.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpsim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-12T15:43:54.000Z","updated_at":"2024-10-17T02:34:38.000Z","dependencies_parsed_at":"2022-08-30T14:31:04.331Z","dependency_job_id":null,"html_url":"https://github.com/jpsim/pod-diffs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsim%2Fpod-diffs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsim%2Fpod-diffs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsim%2Fpod-diffs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsim%2Fpod-diffs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpsim","download_url":"https://codeload.github.com/jpsim/pod-diffs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125589,"owners_count":21051770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T14:07:00.247Z","updated_at":"2025-04-09T23:12:47.876Z","avatar_url":"https://github.com/jpsim.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modifying Pods with Diffs\n\nTimes were simpler (but suckier) when Xcode projects didn't have package management. Now that we have [cocoapods](http://cocoapods.org), modifying vendored code isn't as obvious.\n\nThis project guides you through a neat way to modify pods using patchfiles.\n\nFor an overview of the approaches available to modify pods, please read my article on [Cocoapods Tips \u0026 Tricks](http://jpsim.com/cocoapods-tips-tricks).\n\n## Process\n\n* Start off with an Xcode project using cocoapods.\n* Then copy the file you wish to patch into the project's root directory.\n* Edit the file in the root directory with the changes you'd like to make.\n* Create a `Diffs` directory where you'll keep your patches: `mkdir Diffs`\n\n* Generate the patchfile:\n\n```shell\ndiff -u Pods/JPSImagePickerController/JPSImagePickerController/JPSImagePickerController.m JPSImagePickerController.m \u003e Diffs/JPSImagePickerController.m.diff\n```\n\n* Edit the patchfile to remove dates and have both paths point to Pods:\n\n```\n+++ Pods/JPSImagePickerController/JPSImagePickerController/JPSImagePickerController.m\n--- Pods/JPSImagePickerController/JPSImagePickerController/JPSImagePickerController.m\n```\n\n* Add a `post_install` block to your `Podfile` to apply the patch on every `pod install`:\n\n```ruby\npost_install do | installer |\n\t`patch -p0 \u003c Diffs/JPSImagePickerController.m.diff`\nend\n```\n\n* Finally, remove the temporary file you created: `rm JPSImagePickerController.m`\n\nThe next times you run `pod install`, your patches will be applied.\n\nYou can take a look at the project in this repo to see this process in action. The `Diffs` and `Podfile` will be of interest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpsim%2Fpod-diffs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpsim%2Fpod-diffs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpsim%2Fpod-diffs/lists"}