XCAssetsKit
.xcassets parser written in Swift
Install / Use
/learn @natmark/XCAssetsKitREADME

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
- [x] folder
- [x] imageset
- [x] colorset
- [x] dataset
- [x] textureset
- [x] mipmapset
- [x] 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.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
