I want the first async function to be completed before the second async function gets called
I've tried this:
let group = dispatch_group_create();
//Execute First
dispatch_group_async(group,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
self.LoadFirst("https://www.example.com/first.php", username: MyVariables.username as String)
});
//After Above is Finished then Execute
dispatch_group_notify(group,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
self.LoadSecond("https://www.example.com/second.php", username: MyVariables.username as String!)
});
But they are both running at the same time