How to make a network request wait for an internet connection #programming #swift #coding

preview_player
Показать описание
Set to true waitsForConnectivity property to make network requests wait for a viable internet connection before starting. This is useful in scenarios with intermittent connectivity. timeoutIntervalForResource specifies the maximum time (in seconds) a resource request should take, once it begins. In our example, we set it to 300 seconds, ensuring that downloads don't drag on indefinitely once they've started.
Рекомендации по теме
welcome to shbcf.ru