Загрузка страницы

Multiple API calls with Dispatch Group in Swift iOS Hindi tutorial

Dispatch group can be used in scenarios where we need to do multiple tasks at the same time like you may need to call multiple APIs at the same time. In this swift tutorial, we will understand what are dispatch group and how to use them with simple and easy to understand examples.

One of the key things we have to keep a note of is we have to maintain the sequence of dispatch group enter and dispatch group leave function because failing to do so will not call the dispatch group notify function which is used to call the main thread to return the result of execution.

We will also talk about the dispatch group wait function, I personally have not used it because I am yet to run into a situation where it becomes mandatory for me to use that function however, there’s a catch for using the wait function of the dispatch group which is explained in the video

DispatchGroup also has certain limitations which are discussed at the end of the video, I would not call them limitations but they are just some good to know details.

Given are certain video links that were discussed during the video

DispatchWorkItem: https://youtu.be/zZVS77FoAqc

Given are the chapters covered in today's tutorial
0:00 Introduction
0:50 Project scenario
2:01 API response dependencies
2:28 syntax of dispatch group
4:03 FYI before using dispatch group
4:27 dispatch group demo
10:07 calling leave inside closure
11:22 code refractor
12:23 xcode tip for thread debugging

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥

🔗Click on the link to subscribe: https://www.youtube.com/c/codecat?sub_confirmation=1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------------------------------------------------------------------
📥 Download the source code from

Github: https://github.com/codecat15/Youtube-tutorial/tree/master/DispatchGroupDemo/DGDemo

Google Drive: https://drive.google.com/file/d/1tZp47-VYPxfqIb7mtj3qIIi-JMbxZmvr/view?usp=sharing
-----------------------------------------------------------------------------------------------------------------------

############################################

Connect with me on social media

📷: https://www.instagram.com/codecat15/
📧: codecat15@gmail.com
🐦: https://twitter.com/codecat15
Facebook: https://www.facebook.com/code.cat.792
Github: https://github.com/codecat15

###########################################
#dispatchGroup #gcdDispatchGroupInSwift5 #swiftHindiTutorials

Видео Multiple API calls with Dispatch Group in Swift iOS Hindi tutorial канала Code Cat
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
15 февраля 2021 г. 9:30:06
00:13:17
Яндекс.Метрика