目录
目录README.md

swift-bindata

A simple tool that generates Swift byte array from any asset. Inspired by go-bindata. You can include assets in binary by using this tool.

apm Swift Package Manager

Installation

Homebrew Tap

$ brew tap rb-de0/homebrew-tap
$ brew install swift-bindata

Usage

swift-bindata converts all assets in the specified directory to binary and outputs it to one file.

$ swift-bindata assets/ -o dest/

The generated code is as follows.

struct Assets {

    struct Index {
        static func makeData() -> [UInt8] {
            return [60, 33, 68, 79, 67, 84, 89, 80]
        }
    }
    
}

Future Improvement

  • Multiple asset directories support

LICENSE

swift-bindata is available under the MIT license. See the LICENSE file for more info.

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号