title: Swift 3 Core Data fetch issue
body: <p>The function below is used to get data for tableview</p>
  
  <pre><code>func fetchProfiles() -&gt; Array&lt;User&gt; {
      var users: Array&lt;User&gt; = []
      let fetchRequest: NSFetchRequest&lt;Profile&gt; = Profile.fetchRequest()
      let fetchedData = try! context.fetch(fetchRequest)
      if (!fetchedData.isEmpty) {
          print(fetchedData)
          for i in 0...fetchedData.count {
              var user: User = User()
              user.userName = fetchedData[i].profileName
              user.userSurname = fetchedData[i].profileSurname
              user.userPhoto = fetchedData[i].profilePhoto
              users.append(user)
          }
          return users
      }
      else {
          return users
      }
  }
  </code></pre>
  
  <p>"User" is a simple struct. "Profile" is an entity in Core Data. I create an array of structs to use them for cells in table. Code has no errors(for xCode). When there is no fetched data, it skips appending array, but when there is some info, app crashes with error: </p>
  
  <blockquote>
    <p>fatal error: NSArray element failed to match the Swift Array Element
    type</p>
  </blockquote>