Coder Social home page Coder Social logo

k-lpmg / xcode-build-script-for-carthage Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 3.0 29 KB

If you're using Carthage, you can easily set up Framework dependency in XCode through this script

License: MIT License

Swift 4.56% Ruby 94.14% Shell 1.30%
carthage ios framework dependency script xcode ruby

xcode-build-script-for-carthage's Introduction

XCode Build Script for Carthage

GitHub license

If you're using Carthage as the library dependency manager, you must manually configure the framework path to Build phases and Build settings in XCode after run 'carthage update'. However, using this script after run 'carthage update' eliminates the need to manually configure the framework path.

After carthage update, this script add a run script for Carthage to Build Phases, set up frameworks dependency and add framework search paths to Build Settings

Getting Started

This script uses Xcodeproj. Install it by performing the following command:

$ [sudo] gem install xcodeproj

1. To use the script, open the ruby file (Source/carthage_build_setup.rb)

Enter the target of your project in @scriptTargets you want to apply the script to.

# Constants
@scriptTargets = []

Enter the path to your project.

# Constants
CARTHAGE_FRAMEWORK_PATH = "YOUR_CARTHAGE_FOLDER_PATH/Carthage/Build/iOS"

# Variables
@project = Xcodeproj::Project.open"YOUR_PROJECT_PATH/YOUR_PROJECT_NAME.xcodeproj"

2. Move the script file to your project path.

3. Run

$ carthage update
$ ruby carthage_build_setup.rb

4. Press check, your project Build Phases, Frameworks and Framework Search Paths in Build Settings

Example

Building Project

  1. Install Carthage libraries.

    $ carthage update
    $ cd Scripts
    $ ruby carthage_build_phase_setup.rb

    or

    $ cd Scripts
    $ sh carthage_update.sh
  2. Open CarthageScriptExample.xcodeproj file.

  3. Press โŒ˜ + B to build the project.

  4. Press check, the build is succeeded

  5. Press check, your project Build Phases and Framework Search Paths in Build Settings

Script Success

script-success

Frameworks Dependency

project-frameworks

Build Phases

build-phases

LICENSE

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

xcode-build-script-for-carthage's People

Contributors

k-lpmg avatar marcelosalloum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xcode-build-script-for-carthage's Issues

Referencing for macOS missing

Script currently considers iOS only. Capability to implement frameworks for macOS is not possible.

Adding a switch to select the target OS or auto recognition may help.

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.