title: Swift Codable protocol with Strings and UIImages
body: <p>I am trying to save data via a codable protocol. It is an array of structures with structs inside. There are strings, images and bool values and I am thinking it is one of these data types that does not conform to the protocol.</p>
  
  <p>Here is a pic of all the data I must save:
  <a href="https://i.stack.imgur.com/gUnc0.png" rel="nofollow noreferrer">original</a></p>
  
  <pre><code>struct Checklist {
  
      var name: String
      var image: UIImage?
      var items: [Item] = []
  }
  
  struct Item {
  
      var nameOfNote: String
      var remind: Bool
      //var date: Date
  }
  
  struct alldata: Codable {
  
      var checklists: [Checklist] = []
  }
  </code></pre>
  
  <p>I have tried to include the protocol in all the structs but it also produced an error. Here's a pic:
  <a href="https://i.stack.imgur.com/CYUnS.png" rel="nofollow noreferrer">tried a solution picture</a></p>