{"id":23392684,"url":"https://github.com/Adyen/adyen-swift-public-api-diff","last_synced_at":"2025-08-24T11:31:05.036Z","repository":{"id":262670620,"uuid":"843382084","full_name":"Adyen/adyen-swift-public-api-diff","owner":"Adyen","description":"This tool allows comparing 2 versions of a swift (sdk) project and lists all changes in a human readable way.","archived":false,"fork":false,"pushed_at":"2025-07-22T12:19:42.000Z","size":2652,"stargazers_count":60,"open_issues_count":5,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-17T23:40:28.683Z","etag":null,"topics":["adyen","api-diffs","diff","sdk","swift","swift-api"],"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/Adyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-16T11:48:26.000Z","updated_at":"2025-07-22T12:19:44.000Z","dependencies_parsed_at":"2025-01-18T13:21:32.892Z","dependency_job_id":"8bcc799d-331e-4823-8195-d4fbdb86d135","html_url":"https://github.com/Adyen/adyen-swift-public-api-diff","commit_stats":null,"previous_names":["adyen/adyen-swift-public-api-diff"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/Adyen/adyen-swift-public-api-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-swift-public-api-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-swift-public-api-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-swift-public-api-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-swift-public-api-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adyen","download_url":"https://codeload.github.com/Adyen/adyen-swift-public-api-diff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-swift-public-api-diff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271854475,"owners_count":24834453,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adyen","api-diffs","diff","sdk","swift","swift-api"],"created_at":"2024-12-22T05:02:09.703Z","updated_at":"2025-08-24T11:31:05.021Z","avatar_url":"https://github.com/Adyen.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"[![🧪 Run Tests](https://github.com/Adyen/adyen-swift-public-api-diff/actions/workflows/run-tests.yml/badge.svg)](https://github.com/Adyen/adyen-swift-public-api-diff/actions/workflows/run-tests.yml)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FAdyen%2Fadyen-swift-public-api-diff%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/Adyen/adyen-swift-public-api-diff)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FAdyen%2Fadyen-swift-public-api-diff%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/Adyen/adyen-swift-public-api-diff)\n\n![github-header](https://github.com/user-attachments/assets/08ec7d60-eb0f-4937-b44a-afff02eff72c)\n\n\n# Swift Public API diff\n\nThis tool allows comparing 2 versions of a swift (sdk) project and lists all changes in a human readable way.\n\nIt makes use of `.swiftinterface` files that get produced during the archiving of a swift project and parses them using [`swift-syntax`](https://github.com/swiftlang/swift-syntax).  \n\n## Contributing\nWe strongly encourage you to contribute to our repository. Find out more in our [contribution guidelines](https://github.com/Adyen/.github/blob/master/CONTRIBUTING.md)\n\n## Requirements\n- **Xcode** \u003e= 16.0 (incl. Xcode command line tools)\n- **Swift** \u003e= 5.9\n\n## Usage\n \n### From Project to Output\n\n- Build using the iOS sdk (Requires an iOS Simulator to be installed)\n```bash\nswift run public-api-diff \\\n    project \\\n    --platform iOS \\\n    --new \"develop~https://github.com/Adyen/adyen-ios.git\" \\\n    --old \"5.12.0~https://github.com/Adyen/adyen-ios.git\"\n```\n- Build using the macOS sdk\n```bash\nswift run public-api-diff \\\n    project \\\n    --platform macOS \\\n    --new \"main~https://github.com/Adyen/adyen-swift-public-api-diff\" \\\n    --old \"0.4.0~https://github.com/Adyen/adyen-swift-public-api-diff\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003e--help:\u003c/b\u003e\u003c/summary\u003e\n\n```\nUSAGE: public-api-diff project --new \u003cnew\u003e --old \u003cold\u003e --platform \u003cplatform\u003e [--scheme \u003cscheme\u003e] [--swift-interface-type \u003cswift-interface-type\u003e] [--output \u003coutput\u003e] [--log-output \u003clog-output\u003e] [--log-level \u003clog-level\u003e]\n\nOPTIONS:\n  --new \u003cnew\u003e             Specify the updated version to compare to\n  --old \u003cold\u003e             Specify the old version to compare to\n  --platform \u003cplatform\u003e   The platform to build the project for (iOS/macOS)\n  --scheme \u003cscheme\u003e       [Optional] Which scheme to build (Needed when\n                          comparing 2 xcode projects)\n  --swift-interface-type \u003cswift-interface-type\u003e\n                          [Optional] Specify the type of .swiftinterface you\n                          want to compare (public/private) (default: public)\n  --output \u003coutput\u003e       [Optional] Where to output the result (File path)\n  --log-output \u003clog-output\u003e\n                          [Optional] Where to output the logs (File path)\n  --log-level \u003clog-level\u003e [Optional] The log level to use during execution\n                          (default: default)\n  -h, --help              Show help information.\n ```\n\u003c/details\u003e\n \n### From `.swiftinterface` to Output\n\n**1.** Build 2 versions of your project with `BUILD_LIBRARY_FOR_DISTRIBUTION=YES`\n```bash\nxcodebuild clean build \\\n    -scheme \"YOUR_TARGET_NAME\" \\\n    -derivedDataPath .build \\\n    -sdk \"$(xcrun --sdk iphonesimulator --show-sdk-path)\" \\\n    -destination \"generic/platform=iOS\" \\\n    BUILD_LIBRARY_FOR_DISTRIBUTION=YES\n```\n\n**2.** Provide the `.swiftinterface` files to the public api diff\n```bash\nswift run public-api-diff \\\n    swift-interface \\\n    --new \"new/path/to/project.swiftinterface\" \\\n    --old \"old/path/to/project.swiftinterface\"\n```\n \n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003e--help:\u003c/b\u003e\u003c/summary\u003e\n \n```\nUSAGE: public-api-diff swift-interface --new \u003cnew\u003e --old \u003cold\u003e [--target-name \u003ctarget-name\u003e] [--old-version-name \u003cold-version-name\u003e] [--new-version-name \u003cnew-version-name\u003e] [--output \u003coutput\u003e] [--log-output \u003clog-output\u003e] [--log-level \u003clog-level\u003e]\n\nOPTIONS:\n  --new \u003cnew\u003e             Specify the updated .swiftinterface file to compare to\n  --old \u003cold\u003e             Specify the old .swiftinterface file to compare to\n  --target-name \u003ctarget-name\u003e\n                          [Optional] The name of your target/module to show in\n                          the output\n  --old-version-name \u003cold-version-name\u003e\n                          [Optional] The name of your old version (e.g. v1.0 /\n                          main) to show in the output\n  --new-version-name \u003cnew-version-name\u003e\n                          [Optional] The name of your new version (e.g. v2.0 /\n                          develop) to show in the output\n  --output \u003coutput\u003e       [Optional] Where to output the result (File path)\n  --log-output \u003clog-output\u003e\n                          [Optional] Where to output the logs (File path)\n  --log-level \u003clog-level\u003e [Optional] The log level to use during execution\n                          (default: default)\n  -h, --help              Show help information.\n```\n\u003c/details\u003e\n\n### From `.framework` to Output\n\n```bash\nswift run public-api-diff \\\n    framework \\\n    --target-name \"TargetName\" \\\n    --new \"new/path/to/project.framework\" \\\n    --old \"old/path/to/project.framework\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003e--help:\u003c/b\u003e\u003c/summary\u003e\n\n```\nUSAGE: public-api-diff framework --new \u003cnew\u003e --old \u003cold\u003e --target-name \u003ctarget-name\u003e [--swift-interface-type \u003cswift-interface-type\u003e] [--old-version-name \u003cold-version-name\u003e] [--new-version-name \u003cnew-version-name\u003e] [--output \u003coutput\u003e] [--log-output \u003clog-output\u003e] [--log-level \u003clog-level\u003e]\n\nOPTIONS:\n  --new \u003cnew\u003e             Specify the updated .framework to compare to\n  --old \u003cold\u003e             Specify the old .framework to compare to\n  --target-name \u003ctarget-name\u003e\n                          The name of your target/module to show in the output\n  --swift-interface-type \u003cswift-interface-type\u003e\n                          [Optional] Specify the type of .swiftinterface you\n                          want to compare (public/private) (default: public)\n  --old-version-name \u003cold-version-name\u003e\n                          [Optional] The name of your old version (e.g. v1.0 /\n                          main) to show in the output\n  --new-version-name \u003cnew-version-name\u003e\n                          [Optional] The name of your new version (e.g. v2.0 /\n                          develop) to show in the output\n  --output \u003coutput\u003e       [Optional] Where to output the result (File path)\n  --log-output \u003clog-output\u003e\n                          [Optional] Where to output the logs (File path)\n  --log-level \u003clog-level\u003e [Optional] The log level to use during execution\n                          (default: default)\n  -h, --help              Show help information.\n```\n\u003c/details\u003e\n\n## Release Build\n### Create\n```bash\nswift build --configuration release\n```\n\n### Run\n```bash\n./public-api-diff \\\n    project \\\n    --new \"develop~https://github.com/Adyen/adyen-ios.git\" \\ \n    --old \"5.12.0~https://github.com/Adyen/adyen-ios.git\"\n```\n```bash\n./public-api-diff \\\n    swift-interface \\\n    --new \"new/path/to/project.swiftinterface\" \\\n    --old \"old/path/to/project.swiftinterface\"\n```\n```bash\n./public-api-diff \\\n    framework \\\n    --target-name \"TargetName\" \\\n    --new \"new/path/to/project.framework\" \\\n    --old \"old/path/to/project.framework\"\n```\n\n## Github Action\nThe public-api-diff can be used easily via the provided github action, which creates a comment on a PR (if applicable) and also adds it to the Github step summary.\n```bash\n- name: 🔍 Detect Changes\n  uses: Adyen/adyen-swift-public-api-diff@0.4.0\n  with:\n    platform: \"iOS\"\n    new: \"develop~https://github.com/Adyen/adyen-ios.git\"\n    old: \"5.12.0~https://github.com/Adyen/adyen-ios.git\"\n```\nSee: [example workflow](https://github.com/Adyen/adyen-swift-public-api-diff/blob/main/Examples/github-workflow.yml)\n\n## Alternatives\n- **swift-api-digester**\n  - `xcrun swift-api-digester -dump-sdk`\n  - `xcrun swift-api-digester -diagnose-sdk`\n\n## Projects using `public-api-diff`\n- [Adyen iOS Checkout](https://github.com/Adyen/adyen-ios)\n\n## Inspiration\n - https://github.com/sdidla/Hatch/blob/main/Sources/Hatch/SymbolParser.swift\n   - For parsing swift files using [swift-syntax](https://github.com/swiftlang/swift-syntax)'s [`SyntaxVisitor`](https://github.com/swiftlang/swift-syntax/blob/main/Sources/SwiftSyntax/generated/SyntaxVisitor.swift)\n\n## Support\nIf you have a feature request, or spotted a bug or a technical problem, create a GitHub issue.\n\n## License    \nMIT license. For more information, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdyen%2Fadyen-swift-public-api-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdyen%2Fadyen-swift-public-api-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdyen%2Fadyen-swift-public-api-diff/lists"}