xca

XCAssetsKit

.xcassets parser written in Swift

Showing:

Popularity

Downloads/wk

0

GitHub Stars

47

Maintenance

Last Commit

2yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

Header

Build Status Pods Version Swift

XCAssetsKit

.xcassets parser written in Swift 🐧

Usage

    let xcassets: XCAssets = try! XCAssets(fileURL: URL(fileURLWithPath: "path/to/file.xcassets"))

    let contents: XCAssetsContents = xcassets.contents // Decode Contents.json
    let assets: [Assets] = xcassets.assets // Decode Assets
    
    if case .imageSet(let imageSet) == assets[0] {
        print(imageSet.fileName) // image_png
        print(imageSet.contents.images.count) // 3

        print(imageSet.contents.images[0].filename) // Optional("Artboard.png")
        print(imageSet.contents.images[0].scale) // Optional("1x")

        print(imageSet.contents.images[1].filename) // Optional("Artboard@2x.png")
        print(imageSet.contents.images[1].scale) // Optional("2x")

        print(imageSet.contents.images[2].filename) // Optional("Artboard@3x.png")
        print(imageSet.contents.images[2].scale) // Optional("3x")
    }

Supported Assets

  • folder
  • imageset
  • colorset
  • dataset
  • textureset
  • mipmapset
  • cubetextureset
  • appiconset
  • appiconset
  • launchimage
  • brandassets
  • appiconset
  • iconset
  • stickericonset
  • arresorucegroup
  • arreferenceimage
  • arobject
  • complicationset
  • imagestack
  • imagestacklayer
  • spriteatlas
  • gcdashboardimage
  • gcleaderboard
  • gcleaderboardSet
  • stickerpack
  • sticker
  • stickersequence

License

XCAssetsKit is available under the MIT license. See the LICENSE file for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100