title: Path to a file in the Extensions Folder
body: <p>I am trying to find a path to file in the extensions folder, but unfortunately, the app crashes every time while doing this. I really have no clue as to why its happening. Any suggestions?</p>
  
  <p><a href="https://i.stack.imgur.com/ze7Lt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ze7Lt.png" alt="Screenshot Image"></a></p>
  
  <p>The file is located in the Keyboard Folder and its called StickersList.plist</p>
  
  <p>The code is being generated in the viewDidLoad() inside KeyboardViewController.swift</p>
  
  <pre><code>if let path = Bundle.main.path(forResource: "StickersList", ofType: ".plist") {
      print("I got in")
      print(path)
      let dict = NSDictionary(contentsOfFile: path) as! Dictionary&lt;String,AnyObject&gt;
      let allSections = dict["Sections"] as? [[String:AnyObject]]
      print(allSections)
      if let selectedSections = UserDefaults.standard.array(forKey: "selectedSections") as? [Int] {
          for index in selectedSections {
              self.data.append((allSections![index]))
          }
      }
  }
  </code></pre>
  
  <p>it crashes as soon as it runs the if statement. Any suggestions?</p>