---
title: "MTSpriteDecodable | Mobile sdk | Mobile sdk ios | Ios"
description: "A custom decoder for the sprite field in the style JSON, which can be either a single string (URL) or an array of objects containing id and url."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTSpriteDecodable

```
public enum MTSpriteDecodable : Decodable, Equatable
```

A custom decoder for the `sprite` field in the style JSON, which can be either a single string (URL) or an array of objects containing `id` and `url`.

-   `[single(_:)](#/s:11MapTilerSDK17MTSpriteDecodableO6singleyAC10Foundation3URLVcACmF)`
    
    Undocumented
    
    #### Declaration
    
    Swift
    
    ```
    case single(URL)
    ```
    
-   `[multiple(_:)](#/s:11MapTilerSDK17MTSpriteDecodableO8multipleyACSayAA13MTStyleSpriteVGcACmF)`
    
    Undocumented
    
    #### Declaration
    
    Swift
    
    ```
    case multiple([MTStyleSprite])
    ```
    
-   `[init(from:)](#/s:Se4fromxs7Decoder_p_tKcfc)`
    
    #### Declaration
    
    Swift
    
    ```
    public init(from decoder: Decoder) throws
    ```
    
-   `[sprites](#/s:11MapTilerSDK17MTSpriteDecodableO7spritesSayAA13MTStyleSpriteVGvp)`
    
    Flattens the parsed sprites into a uniform array of `[MTStyleSprite](https://docs.maptiler.com/mobile-sdk/ios/api/Structs/MTStyleSprite/)`.
    
    #### Declaration
    
    Swift
    
    ```
    public var sprites: [MTStyleSprite] { get }
    ```
