Umbrellify is not stable and still in development.
Umbrellify is a tool that combines frameworks into an alias. It uses @_exported
annotation to provide a single import declaration, which exports multiple other imports. The only supported language is Swift.
Here is what Umbrellify does:
- Creates a new target in your project
- Adds selected imports in the target's file and exports them
- Scans your source code and replaces selected imports with created target's import
Umbrellify can be installed through RubyGems, the Ruby package manager. Run the following command to install:
$ gem install umbrellify
To use Umbrellify in your Xcode project, you first need to create a configuration file, named Umbrellifile
in your project's directory. The contents of Umbrellifile
follow YAML syntax.
An example configuration is showed below:
umbrella_target_name: MyAppCoreFrameworks
main_target_name: MyApp
substitute_managed_imports_only: false
project_path: MyApp.xcodeproj
source_path: ./MyApp
managed_targets:
- Core
- Models
- Resources
Name of the created framework.
Name of your app's target that will depend on the created framework (typically, it is your Application target).
Substitute import statements in source files only if all of the managed imports are present. For example, here is a source file header:
import Foundation
import Core
import Models
class MyModel {
...
If substitute_managed_imports_only
is set to true
, the header will stay untouched hence the missing Resources import.
If the option is set to false
, the header becomes modified:
import Foundation
import MyAppCoreFrameworks
class MyModel {
...
Path to your .xcodeproj file.
Path to your source files to be modified (typically, it should be your app target's main bundle path). If the option is not set, the path is default to current directory.
List of target names that should be included in the created framework.
Ubrellify is designed to be used constantly throughout the development process. Each time it is launched, Umbrellify updates its created target contents and scans source files for the presense of new managed import declarations.
To use Umbrellify, run the following command in the directory where your Umbrellifile is:
$ umbrellify
These works are available under the MIT license. See the LICENSE file for more info.