GithubHelp home page GithubHelp logo

acecilia / specgen Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 51 KB

A command line tool for generating podspec files from frameworks, so they can be used in a CocoaPods setup

License: MIT License

Swift 79.68% Makefile 11.84% Shell 8.49%
swift cocoapods framework cli podspec xcode

specgen's Introduction

SpecGen

SpecGen is a command line tool for generating podspec files from frameworks, so they can be used in a CocoaPods setup.

  • ๐Ÿ”ฅ Generates .podspec files from .framework files
  • ๐Ÿ”ฅ Carthage compatibility, so the generated .podspec files contain the version specified in the Carfile.resolved (effectively delegating to Carthage the dependency resolution)
  • ๐Ÿ”ฅ Use CocoaPods and Carthage together, allowing pods to depend on frameworks installed by Carthage
  • ๐Ÿ”ฅ Massively reduce build times by substituting source code pods with their .framework

Installing

mint install acecilia/specgen

Make

git clone https://github.com/acecilia/specgen.git
cd SpecGen
make

Usage (with Carthage)

  1. Tell SpecGen which .podspec files to generate by customizing your Cartfile:

    github "SwiftKickMobile/SwiftMessages" == 5.0.1
    
    # specgen:start
    github "hackiftekhar/IQKeyboardManager" == 6.2 # specgen:frameworks IQKeyboardManager IQKeyboardManagerSwift
    github "madebybowtie/FlagKit" == 2.2
    
  2. Generate the .podspec files:

    specgen bootstrap
  3. Integrate the .podspec files in your Podfile:

load '<path_to_frameworks>/Podfile' # <==============
target 'MyApp' do
    autogenerated_pods # <==============
    pod 'Alamofire', '~> 3.0'
end

Advanced usage

Generate .podspec files

If you are using Carthage (by default specgen looks for the frameworks under Carthage/Build/iOS), simply run:

specgen bootstrap

If not, you have to specify the path containing the frameworks:

specgen bootstrap --frameworksPath <path_to_frameworks>

This will generate the necessary .podspec files next to the frameworks.

To see all the possible options, run:

specgen --help

Integrate the .podspec files in your Podfile

You have two options:

  • Using the autogenerated Podfile:

    load '<path_to_frameworks>/Podfile' # <==============
    target 'MyApp' do
        autogenerated_pods # <==============
        pod 'Alamofire', '~> 3.0'
    end
  • Not using the autogenerated Podfile: point each pod to the local path containing the .podspec file:

    target 'MyApp' do
        pod 'FlagKit', :path => '<path_to_frameworks>'
        pod 'IQKeyboardManager', :path => '<path_to_frameworks>'
        pod 'IQKeyboardManagerSwift', :path => '<path_to_frameworks>'
        pod 'NVActivityIndicatorView', :path => '<path_to_frameworks>'
        pod 'NVActivityIndicatorViewAppExtension', :path => '<path_to_frameworks>'
        pod 'Result', :path => '<path_to_frameworks>'
        pod 'SideMenu', :path => '<path_to_frameworks>'
        pod 'SnapKit', :path => '<path_to_frameworks>'
        pod 'SwiftMessages', :path => '<path_to_frameworks>'
        pod 'Alamofire', '~> 3.0'
    end

Use a Cartfile to customize which .podspec files to generate:

it is possible to add comments to a Cartfile in order to specify which of the frameworks requires a .podspec. Take the following Cartfile as an example:

github "SwiftKickMobile/SwiftMessages" == 5.0.1

# specgen:start
github "hackiftekhar/IQKeyboardManager" == 6.2 # specgen:frameworks IQKeyboardManager IQKeyboardManagerSwift
github "madebybowtie/FlagKit" == 2.2

SpecGen will generate .podspec files for three frameworks:

  • IQKeyboardManager, with version 6.2
  • IQKeyboardManagerSwift, with version 6.2
  • FlagKit, with version 2.2

This allows to add some frameworks in your project by following the official Carthage method, and some others through CocoaPods, using the .podspec files generated by SpecGen.

License

SpecGen is licensed under the MIT license. See LICENSE for more info.

specgen's People

Contributors

acecilia avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.