Code Monkey home page Code Monkey logo

ios-image-report's Introduction

iOS Image Report

Find issues in an Xcode iOS project regarding retina/non-retina, unused, and missing images.

Introduction

When developing for iOS, it's common to have multiple versions of the same image, one each for retina and non-retina devices (icon.png and [email protected], for example).

Within the source code, the images may be referenced by either the 1x or the 2x filenames, which can have some unexpected consequences.

Running this ruby script on your Xcode project will find some of these issues in addition to missing and unused images.

Details

Listed below are the conditions that will be checked:

  • Only the 1x image exists
    • Code references 1x image => Warning: Image will be upscaled on retina devices.
    • Code references 2x image => Error: Missing image.
  • Only the 2x image exists
    • Code references 1x image => [Need to check]
    • Code references 2x image => [Need to check]
  • Both 1x and 2x images exist
    • Code references 1x image => Warning: Image will be downscaled on non-retina devices.

Usage

 ./iOSImageReport.rb -d <directory of Xcode project> [-l]
  • -d(ir) flag specifies the project directory
  • -l(ist) flag will print a list of which images have only 1x versions, only 2x versions, and both 1x and 2x versions
  • -a(ll) flag will print a list of all the images in the directory

Limitations

The current version has a few limitations:

  • Only checks .png images
  • Only works for a single directory

ios-image-report's People

Contributors

allewun avatar

Watchers

Garen Torikian avatar James Cloos 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.