https://github.com/batchlabs/bridgy
Swift bridging header generator
https://github.com/batchlabs/bridgy
bridging-header swift tool
Last synced: 19 days ago
JSON representation
Swift bridging header generator
- Host: GitHub
- URL: https://github.com/batchlabs/bridgy
- Owner: BatchLabs
- License: mit
- Created: 2019-08-06T14:19:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T08:36:03.000Z (about 4 years ago)
- Last Synced: 2025-10-14T13:25:53.967Z (9 months ago)
- Topics: bridging-header, swift, tool
- Language: Swift
- Size: 14.6 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bridgy
Bridgy allows you to automatically generate Swift bridging headers by scanning folders on disk.
This allows your developers to freely add and remove Objective-C headers without having to manually change the bridging headers.
A good use case for this are bridging headers used in unit tests.
Bridgy allows you to generate separate headers to increase readability and cleaner git diffs.
## Usage
```
bridgy
```
## Configuration
Example configuration file:
```
// Unless absolute, all paths are relative to the configuration json you provide to the bridgy CLI
{
"output_directory": "tests/Bridging Headers/", // Directory where the bridging headers will be generated
"base_search_path": "source/", // Base path for "path" keys in the "header" object. Kinda works like a "base header search path"
"headers": {
"Login-Bridging.h": { // Output bridging header filename
"path": "Login", // Path of the folder to scan
"recursive": true, // Recursively scan
"ignoredNames": "^Public.*" // Headers will be ignored if they match this regexp, use null if you want to skip anything
"frameworkName": null // Set a framework name if your headers are part of a framework. A non null value will output rather than "Header.h"
}
}
}
```
All keys are mandatory.
Note: By design, Bridgy will not follow symlinks, nor work with symlinked header files.
## Usage as a library
Bridgy can also be used as a SPM library:
- Bridgy.Generator allows you to interact with the header generator directly
- Bridgy.CommandLine allows you to use Bridgy's CLI directly. Note that for now, this directly parses the cli arguments: feel free to copy that code in your own CLI argument parser if you need to tweak it.