Xcode 7 does not display data in the syntax table view in the simulator, but works on the device

I use the Parse table view class, I have a custom cell to represent the table, everything works fine in Xcode 6.3.2. I just upgraded my Xcode to beta 7 because I want to run tests on my device without paying $ 100 for a developer account. In any case, the parsing table view does not display the data in the form of a table: view table screenshot

When in fact, when I try to print the results of my queries on the console, I get my results. Here, my code for the controller has been increased for this view:

import UIKit import Parse import ParseUI class MeetsTableViewController: PFQueryTableViewController { // Initialise the PFQueryTable tableview override init(style: UITableViewStyle, className: String!) { super.init(style: style, className: className) } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) // Configure the PFQueryTableView self.parseClassName = "Meets"; self.pullToRefreshEnabled = true; self.textKey="city"; self.paginationEnabled = false; } // Define the query that will provide the data for the table view override func queryForTable() -> PFQuery { let query = PFQuery(className: "Meets"); query.orderByDescending("numberOfComming"); return query; } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject?) -> PFTableViewCell { var cell = tableView.dequeueReusableCellWithIdentifier("MyCell") as! CarTableViewCell!; if cell == nil { cell = CarTableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "MyCell"); } if let cityName = object?["city"] as? String{ cell?.meetName?.text = "מפגש ב\(cityName)"; } if let address = object?["address"] as? String{ cell?.meetAddress?.text = address; } if let date = object?["date"] as? String{ cell?.meetDate?.text = date; } if let time = object?["time"] as? String{ cell?.meetTime?.text = time; } if let people = object?["numberOfComming"] as? Int{ cell?.peopleAttending?.text = "\(people)"; } print(object); // console is printing query results successfully if let thumbnail = object?["meetImg"] as? PFFile { thumbnail.getDataInBackgroundWithBlock{ (imageData, error) -> Void in if error == nil { let image = UIImage(data: imageData!) cell.meetImage.image = image }} } return cell; } 

}

UPDATE
I was just trying to run the application on my device, and the table works as it should, just the simulator does not show data.

+4
source share
1 answer

If the data is downloaded to your device, and not to the simulator, it may be a problem of not modeling the location, which may prevent your request from receiving results to fill out a table view.

If this may be the case, you can simulate the location using the following options:
1) Xcode → Debug → Simulate location (see screenshot below) by selecting one of the cities or adding a GPX file to your project.
2) Simulator → Debug → Location (see screenshot below).
3) You can also set your location through Maps on Simulator (see http://apple.co/1JtnYIv ).

enter image description here

0
source

All Articles