I have an app that fetches data from Parse.com and writes it to disk. I can see it being written in the xcode log. Into core data. Then it creates a query from CD and fills an array to display locations in a table view in one tab of a tabbarcontroller and another query to fetch those locations from cd and annotate (pins) on a mapkit.
For some reason the app doesnt plot any pins the first time i run it. I have to close it (background it) and then reopen it for the pins to show up.
If the data is being gotten from the web and into CD, which I can see happening (its only 2 points) and after all that data has been written to disk (CD), i proceed to tap the button that plots those points on a map kit…why would they not plot the first time?
I was getting the data from CD in the viewDidLoad method, which immediately populated my array of locations. When I tried plotting them, the array was empty because the view loads faster than the CD fetch populates the array 🙂 I had to use NSNotification to repopulate the array.