The gotoplaces() function is what utilizes the arrays: Thanks for showing the code.
Then you need to call gotoaces() or (gotoplaces() or gotoPlaces()?) inside the completion handler.
I thought that since the function was called after task.resume() meant that it finished? It is a very common misunderstanding among who are not accustomed to async call.
task.resume() just triggers to start the task. When the task is finished, iOS tell your app that the task is completed.
Another too simplified advice:
Do not write any lines after task.resume().
Topic:
Programming Languages
SubTopic:
Swift
Tags: