Giter Club home page Giter Club logo

assetgenerator's Introduction

Asset Generator

Xcode build phase for generating scaled assets

sample.gif

Xcode users know that scaling image and AppIcon assets is inefficient. Even by using tools that generate icons, precious time is spent dragging and dropping. Asset Generator is a completely automated tool that runs during your project's Build Phase. For every image and icon in .xcassets folders, Asset Generator will find the largest asset and scale it to fill any missing sizes.

Getting Started

These instructions will show you how to implement Asset Generator as an Xcode build phase in your project.

Adding to Xcode

  1. Download the scripts folder and place it in your desired Xcode target.

  2. In project settings: Target > Build Phases > + > New Run Script Phase

  3. In the Run Script Phase, enter: "$PROJECT_DIR"/"$PROJECT_NAME"/scripts/generateAssests.sh

Using in Xcode

Build your project and assets will be generated.

For assets, you may provide any size, but you will recieve a build warning unless the largest required scale is provided.

By default, all assets will be generated from the largest asset during build. To generate only missing assets, change the contents of generateAssets.sh by removing the -a flag:

ruby "$PROJECT_DIR"/"$PROJECT_NAME"/scripts/AssetSpec.rb -a โ†’ ruby "$PROJECT_DIR"/"$PROJECT_NAME"/scripts/AssetSpec.rb

Built With

Contributing

The provided scripts are starting points for your own implementation. If you encounter bugs in the provided scripts, please report an issue.

If you have enhancements or feature requests, report an issue or create a pull request.

Authors

assetgenerator's People

Contributors

maustinstar avatar

Watchers

James Cloos 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.