{"id":21064613,"url":"https://github.com/capturecontext/combine-interception","last_synced_at":"2025-10-19T06:41:30.059Z","repository":{"id":184241106,"uuid":"671544396","full_name":"CaptureContext/combine-interception","owner":"CaptureContext","description":"Package extending Apple' `Combine` framework for interception of objc selectors.","archived":false,"fork":false,"pushed_at":"2024-02-28T03:39:54.000Z","size":47,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T19:12:59.835Z","etag":null,"topics":["combine","extensions","frp","interception","macros","objc-runtime","reactive","reactive-programming","runtime","selectors","spm","swift","swift-macro","swift-macros","swift-package-manager","swift-runtime"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CaptureContext.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-27T15:01:12.000Z","updated_at":"2024-06-11T09:34:08.000Z","dependencies_parsed_at":"2025-05-16T02:35:04.780Z","dependency_job_id":"b1349064-1c68-4612-998b-33234710631e","html_url":"https://github.com/CaptureContext/combine-interception","commit_stats":null,"previous_names":["capturecontext/combine-interception"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/CaptureContext/combine-interception","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptureContext%2Fcombine-interception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptureContext%2Fcombine-interception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptureContext%2Fcombine-interception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptureContext%2Fcombine-interception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaptureContext","download_url":"https://codeload.github.com/CaptureContext/combine-interception/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptureContext%2Fcombine-interception/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265905116,"owners_count":23846696,"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":["combine","extensions","frp","interception","macros","objc-runtime","reactive","reactive-programming","runtime","selectors","spm","swift","swift-macro","swift-macros","swift-package-manager","swift-runtime"],"created_at":"2024-11-19T17:50:17.747Z","updated_at":"2025-10-19T06:41:29.975Z","avatar_url":"https://github.com/CaptureContext.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# combine-interception\n\n[![CI](https://github.com/CaptureContext/combine-interception/actions/workflows/ci.yml/badge.svg)](https://github.com/CaptureContext/combine-interception/actions/workflows/ci.yml) [![SwiftPM 5.9](https://img.shields.io/badge/swiftpm-5.9-ED523F.svg?style=flat)](https://swift.org/download/) ![Platforms](https://img.shields.io/badge/Platforms-iOS_13_|_macOS_10.15_|_Catalyst_13_|_tvOS_14_|_watchOS_7-ED523F.svg?style=flat) [![@capturecontext](https://img.shields.io/badge/contact-@capturecontext-1DA1F2.svg?style=flat\u0026logo=twitter)](https://twitter.com/capture_context) \n\nCombine API for interception of objc selectors in Swift.\n\n## Usage\n\n### Basic\n\nObserve selectors on NSObject instances\n\n```swift\nnavigationController.intercept(_makeMethodSelector(\n  selector: UINavigationController.popViewController,\n  signature: navigationController.popViewController\n))\n.sink { result in\n  print(result.args) // `animated` flag\n  print(result.output) // popped `UIViewController?`\n}\n```\n\nYou can also simplify creating method selector with `CombineInterceptionMacros` if you are open for macros\n\n```swift\nnavigationController.intercept(\n  #methodSelector(UINavigationController.popViewController)\n).sink { result in\n  print(result.args) // `animated` flag\n  print(result.output) // popped `UIViewController?`\n}\n```\n\n\u003e  Macros require `swift-syntax` compilation, so it will affect cold compilation time\n\n### Library\n\nIf you use it to create a library it may be a good idea to export this one implicitly\n\n```swift\n// Exports.swift\n@_exported import CombineInterception\n```\n\nIt's a good idea to add a separate macros target to your library as well\n\n```swift\n// Exports.swift\n@_exported import CombineInterceptionMacros\n```\n\n## Installation\n\n### Basic\n\nYou can add CombineInterception to an Xcode project by adding it as a package dependency.\n\n1. From the **File** menu, select **Swift Packages › Add Package Dependency…**\n2. Enter [`\"https://github.com/capturecontext/combine-interception.git\"`](https://github.com/capturecontext/combine-interception.git) into the package repository URL text field\n3. Choose products you need to link them to your project.\n\n### Recommended\n\nIf you use SwiftPM for your project, you can add CombineInterception to your package file.\n\n```swift\n.package(\n  url: \"https://github.com/capturecontext/combine-interception.git\", \n  .upToNextMinor(from: \"0.3.0\")\n)\n```\n\nDo not forget about target dependencies:\n\n```swift\n.product(\n  name: \"CombineInterception\", \n  package: \"combine-interception\"\n)\n```\n\n```swift\n.product(\n  name: \"CombineInterceptionMacros\",\n  package: \"combine-interception\"\n)\n```\n\n\n\n## License\n\nThis library is released under the MIT license. See [LICENCE](LICENCE) for details.\n\nSee [ACKNOWLEDGMENTS](ACKNOWLEDGMENTS) for inspiration references and their licences.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapturecontext%2Fcombine-interception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapturecontext%2Fcombine-interception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapturecontext%2Fcombine-interception/lists"}