All Projects → freshOS → Assetchecker

freshOS / Assetchecker

Licence: mit
👮Sanitize your Assets.xcassets files

Programming Languages

swift
15916 projects
script
160 projects

Projects that are alternatives of or similar to Assetchecker

Fengniao
A command line tool for cleaning unused resources in Xcode.
Stars: ✭ 2,852 (+1607.78%)
Mutual labels:  cleanup, xcode, images, slim
Iconizer
Create Xcode asset catalogs swift and painless. Generate images for macOS and iOS app icons, launch images and image sets.
Stars: ✭ 751 (+349.7%)
Mutual labels:  assets, xcode
project-curator
A convenient tool to help cleaning and to maintain Unity Projects ✨
Stars: ✭ 99 (-40.72%)
Mutual labels:  assets, cleanup
RAImagePicker
📸 iMessage-like, Image Picker Controller Provides custom features.
Stars: ✭ 14 (-91.62%)
Mutual labels:  assets, images
Localize
🏁 Automatically clean your Localizable.strings files
Stars: ✭ 311 (+86.23%)
Mutual labels:  cleanup, xcode
Cartool
Mac上解压Assets.car文件的小工具(支持右键解压)
Stars: ✭ 375 (+124.55%)
Mutual labels:  assets, xcode
Assetsextractor
『Assets提取工具』是一款OSX平台上用于将Assets.car或xxx.app中打包的png图片、pdf等资源重新提取出来的开发者工具。Assets.car常见于iOS/Mac/Unity等开发中的资源打包。
Stars: ✭ 486 (+191.02%)
Mutual labels:  assets, resource
Xcassetpacker
A command line tool for converting a folder of images into an .xcasset package for Xcode
Stars: ✭ 150 (-10.18%)
Mutual labels:  xcode, images
Syliusresourcebundle
Simpler CRUD for Symfony applications
Stars: ✭ 156 (-6.59%)
Mutual labels:  resource
Androidlibrary
Android library to reveal or obfuscate strings and assets at runtime
Stars: ✭ 162 (-2.99%)
Mutual labels:  assets
Pulley
A library to imitate the iOS 10 Maps UI.
Stars: ✭ 1,928 (+1054.49%)
Mutual labels:  xcode
Paperclip Meta
Adds width, height, and size to paperclip images.
Stars: ✭ 157 (-5.99%)
Mutual labels:  images
Node Imgur
Upload images to imgur.com
Stars: ✭ 161 (-3.59%)
Mutual labels:  images
Whats New In Swift 4
An Xcode playground showcasing the new features in Swift 4.0.
Stars: ✭ 1,860 (+1013.77%)
Mutual labels:  xcode
Vue Displacement Slideshow
A Vue.js 2.0 slideshow component working with Three.js
Stars: ✭ 165 (-1.2%)
Mutual labels:  images
Radar Covid Ios
Native iOS app using DP^3T iOS sdk to handle Exposure Notification framework from Apple
Stars: ✭ 157 (-5.99%)
Mutual labels:  xcode
Accordionswift
The best way of implement an accordion menu using an UITableView in Swift
Stars: ✭ 156 (-6.59%)
Mutual labels:  xcode
Essential Image Optimization
Essential Image Optimization - an eBook
Stars: ✭ 1,950 (+1067.66%)
Mutual labels:  images
Xcode Clean.sh
Bash script freeing up disk space by removing Xcode generated data
Stars: ✭ 164 (-1.8%)
Mutual labels:  xcode
Marathon
[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
Stars: ✭ 1,889 (+1031.14%)
Mutual labels:  xcode

Localize

AssetChecker

Language: Swift Platform: iOS codebeat badge License: MIT GitHub tag

AssetChecker is a tiny run script that keeps your Assets.xcassets files clean and emits warnings when something is suspicious.

AssetChecker

Because Image Assets files are not safe, if an asset is ever deleted, nothing will warn you that an image is broken in your code.

Try it!

AssetChecker is part of freshOS iOS toolset. Try it in an example App! Download Starter Project

How

By using a script running automatically, you have a safety net that makes using Asset Catalog a breeze.

What

Automatically (On build)

  • Raises Errors for Missing Assets
  • Raises warnings for Unused Assets

Installation

Installation available via Cocoapods. Add the following to your Podfile:

pod 'AssetChecker', :git => 'https://github.com/freshOS/AssetChecker.git'

Or copy the script into your project.

Add the following Run Script in XCode, this will run the script at every build. If you installed via Cocoapods, you can use the following script:

${PODS_ROOT}/AssetChecker/run --catalog ${SRCROOT}/Resource/Images.xcassets

with arguments:

--catalog Absolute path to your Asset catalog (required)
--source Absolute path to your source directory.  Defaults to $SRCROOT

If you didn't use Cocoapods, use the path of where you copied AssetChecker script:

${SRCROOT}/{PATH_TO_THE_SCRIPT}/AssetChecker.swift ${SRCROOT}/Sources ${SRCROOT}/Resources/Images.xcassets

In this example your source files are located in /Sources and your Asset catalog is in /Resources/Images.xcassets.

And configure top section of the script :

// Configure me \o/
let sourcePath = "/Sources"
let assetCatalogPath = "/Resources/Assets.xcassets"
let ignoredUnusedNames = [String]()

Run and Enjoy \o/

False positives

Sometimes you're building the asset names dynamically so there is no way for AssetChecker to find out statically by looking at the codebase.

In this case the script will emit a false positive.

You can manually declare these false positives so that they get ignored !

Set the ignoredUnusedNames variable in the script file like so:

let ignoredUnusedNames = [
    "voteEN",
    "voteES",
    "voteFR"
]

Author

Sacha Durand Saint Omer, [email protected]

Contributing

Contributions to AssetChecker are very welcomed and encouraged!

License

AssetChecker is available under the MIT license. See LICENSE for more information.

Backers

Like the project? Offer coffee or support us with a monthly donation and help us continue our activities :)

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].