Project

umbrellify

0.0
No commit activity in last 3 years
No release in over 3 years
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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.15
 Project Readme

Umbrellify

Gem Version

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

Installation

Umbrellify can be installed through RubyGems, the Ruby package manager. Run the following command to install:

$ gem install umbrellify

Usage

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

Config structure

umbrella_target_name

Name of the created framework.

main_target_name

Name of your app's target that will depend on the created framework (typically, it is your Application target).

substitute_managed_imports_only

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 {
...

project_path

Path to your .xcodeproj file.

source_path

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.

managed_targets

List of target names that should be included in the created framework.

Usage

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

LICENSE

These works are available under the MIT license. See the LICENSE file for more info.