I'm having an issue where my table view is getting populated with what looks to be chinese characters when I run the app on my iPhone. However, when I run the app through simulator, I get the expected (English) result. Below are screenshots of the issue.
Below is the code that populates the objects
private func populateArtists(_ maxRecordsToPopulate: Int, json: JSON) {
let artists = json["artists"]["items"]
for i in 0 ..< artists.count {
if i < maxRecordsToPopulate {
let artist = Artist()
print(artists[i]["name"].string!)
artist.name = artists[i]["name"].string!
artist.detailUrl = artists[i]["href"].string!
artist.id = artists[i]["id"].string!
self.searchResults.artists.append(artist)
}
}
}
When I place a breakpoint inside, it looks like the JSON values being returned are being parsed differently.
Output from app running in Simulator
Output from app running on iPhone
I thought this might be a localization setting or something somewhere on the phone, but have no clue how to find out if that's the case. I've tried deleting the app from the phone and reinstalling and that didn't help either.
Frameworks I'm using are Facebook SDK, Alamofire, and Swifty-JSON, in case any of those could be causing this weird issue.