title: How do I fix the error: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subcode=0x0) on Xcode
body: <p>when I try to run my app on the iOS simulator, it crashes and I get this error code: <code>Thread 1: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subcode=0x0)</code></p>
  
  <p>The code for the area that the error is showing up in is:</p>
  
  <pre><code>  var appData = [Section: [AppDetail]]()
  for (sectionName, apps) in appDataPList {
    let appDetails: [AppDetail]
    appDetails = apps.flatMap(AppDetail.init(plistData:))
    let section = Section(rawValue: sectionName)!
    appData[section] = appDetails
  }
  
  return appData
  </code></pre>