This is a Swift-based decoder for the .mtsp container, which is designed to be hosted alongside a website's index.html.
For more information on .mtsp, visit github.com/rafalkopiec/mtsp.
- Add
MTSPDecoderas a Swift Package Manager dependencyhttps://github.com/rafalkopiec/mtsp-decoder.git. - Initialise the
Decoderclass in your data model. - Pass in a URL of a metaspace-supported website, such as https://metaspace.rocks/mtsp.
- You will get back an optional
Containerif the download and parsing of the file was successful. - The
Decoderclass has a publishedcontainersdictionary, and the parsedContainerwill be added to that on success. - Subscribing to the published dictionary is recommended.
This MTSPDecoder swift-package module is minimal, and is covered with unit tests.