Skip to content

SwiftCommon/BundleKit

Repository files navigation

Bundle extensions for Apple's Foundation Bundle

Swift 5.0+ license Build Status codecov

Nice little µframework for loading 'local' Bundle JSON resources. Could be extended for other file types.

Getting started

On first checkout you best run: $ make setup that will trigger the scripts/setup bash script to run and check the required dependencies and generate the Xcodeproj.

Features

Load and parse a JSON resource from a Bundle

    let bundle = Bundle.main.bundleFromResources(name: "BundleName[.bundle]")
    let json = bundle?.decode(ObjectType.self, from: "file.json")

Installation

Swift PM

Put this in your Package.swift:

    ...
    dependencies: [
       .package(url: "https://github.com/SwiftCommon/BundleKit", "0.0.1" ..< "1.0.0")
    ],
    targets: [
       .target(
          name: "YourAwesomeApp",
          dependencies: ["BundleKit"]
       )
    ]

License

Licensed under the MIT license.

About

Nice little µframework for loading 'local' Bundle JSON resources

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors