Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Download and Upload Task - Networking with URLSession on iOS 11 / Xcode 9 / Swift 4

Автор: Kodeco

Загружено: 2017-11-28

Просмотров: 13762

Описание:

Learn about URLSessionDownloadTask and URLSessionUploadTask to save results to a file, or upload a data object or a file.

View the full course over here:

https://videos.raywenderlich.com/cour...

---

About www.raywenderlich.com:

raywenderlich.com is a website focused on developing high quality programming tutorials. Our goal is to take the coolest and most challenging topics and make them easy for everyone to learn – so we can all make amazing apps.

We are also focused on developing a strong community. Our goal is to help each other reach our dreams through friendship and cooperation. As you can see below, a bunch of us have joined forces to make this happen: authors, editors, subject matter experts, app reviewers, and most importantly our amazing readers!

---

From Apple Developer Documentation (https://developer.apple.com/documenta...

URLSession is an object that coordinates a group of related network data transfer tasks.

The URLSession class and related classes provide an API for downloading content. This API provides a rich set of delegate methods for supporting authentication and gives your app the ability to perform background downloads when your app isn’t running or, in iOS, while your app is suspended.

The URLSession class natively supports the data, file, ftp, http, and https URL schemes, with transparent support for proxy servers and SOCKS gateways, as configured in the user’s system preferences.

URLSession supports the HTTP/1.1, SPDY, and HTTP/2 protocols. HTTP/2 support is described by RFC 7540, and requires a server supporting either ALPN or NPN for protocol negotiation.

You can also add support for your own custom networking protocols and URL schemes (for your app’s private use) using URLProtocol.

With the URLSession API, your app creates one or more sessions, each of which coordinates a group of related data transfer tasks. For example, if you’re creating a web browser, your app might create one session per tab or window, or one session for interactive use and another for background downloads. Within each session, your app adds a series of tasks, each of which represents a request for a specific URL (following HTTP redirects, if necessary).

The tasks within a given URL session share a common session configuration object, which defines connection behavior, such as the maximum number of simultaneous connections to make to a single host, whether to allow connections over a cellular network, and so on. The behavior of a session is determined in part by which method you call when creating its configuration object:

The singleton shared session (which has no configuration object) is for basic requests. It’s not as customizable as sessions that you create, but it serves as a good starting point if you have very limited requirements. You access this session by calling the shared class method. See that method’s discussion for more information about its limitations.

Default sessions behave much like the shared session (unless you customize them further), but let you obtain data incrementally using a delegate. You can create a default session configuration by calling the default method on the URLSessionConfiguration class.

Ephemeral sessions are similar to default sessions, but they don’t write caches, cookies, or credentials to disk. You can create an ephemeral session configuration by calling the ephemeral method on the URLSessionConfiguration class.

Background sessions let you perform uploads and downloads of content in the background while your app isn’t running. You can create a background session configuration by calling the backgroundSessionConfiguration(_:) method on the URLSessionConfiguration class.

The session configuration object also contains a reference to URL cache and cookie storage objects that may be used when making requests and handling the responses, depending on the configuration and request type.

The tasks in a session also share a common delegate that lets you provide and obtain information when various events occur—when authentication fails, when data arrives from the server, when data is ready to be cached, and so on. Using a URL Session has a step-by-step list of events that occur when a session is performing a task, and which delegate methods are called as a result.

On the other hand, if you don’t need any of the features provided by a delegate, you can use this API without providing one by passing nil when you create a session.

Download and Upload Task - Networking with URLSession on iOS 11 / Xcode 9 / Swift 4

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Async Operations with Concurrency - iOS Concurrency with GCD and Operations - raywenderlich.com

Async Operations with Concurrency - iOS Concurrency with GCD and Operations - raywenderlich.com

URLSession Cookbook - Networking with URLSession on iOS 11 / Xcode 9 / Swift 4

URLSession Cookbook - Networking with URLSession on iOS 11 / Xcode 9 / Swift 4

The Time Profiler - Practical Instruments with iOS 10 - raywenderlich.com

The Time Profiler - Practical Instruments with iOS 10 - raywenderlich.com

Workspaces and Frameworks- Xcode 9 Tips and Tricks -  raywenderlich.com

Workspaces and Frameworks- Xcode 9 Tips and Tricks - raywenderlich.com

Музыка лечит сердце и сосуды🌸 Успокаивающая музыка восстанавливает нервную систему,расслабляющая

Музыка лечит сердце и сосуды🌸 Успокаивающая музыка восстанавливает нервную систему,расслабляющая

Вызовы Swift API для начинающих (сетевое взаимодействие) — Async Await и JSON

Вызовы Swift API для начинающих (сетевое взаимодействие) — Async Await и JSON

Productive Deep Work Music | Уютный зимний ноутбук - Эмбиент биты для фокуса и учебы

Productive Deep Work Music | Уютный зимний ноутбук - Эмбиент биты для фокуса и учебы

iOS Dev 24: Сетевое взаимодействие с URL Session DataTask (GET и POST) | Swift 5, XCode 12

iOS Dev 24: Сетевое взаимодействие с URL Session DataTask (GET и POST) | Swift 5, XCode 12

SHAZAM Top 50🏖️Лучшая Музыка 2025🏖️Зарубежные песни Хиты🏖️Популярные Песни Слушать Бесплатно #40

SHAZAM Top 50🏖️Лучшая Музыка 2025🏖️Зарубежные песни Хиты🏖️Популярные Песни Слушать Бесплатно #40

4 Hours Chopin for Studying, Concentration & Relaxation

4 Hours Chopin for Studying, Concentration & Relaxation

Morning Coffee ☕❄️ Happy Music for Perfect Day ☀️ Relaxing Chillout House 2025 - 2026

Morning Coffee ☕❄️ Happy Music for Perfect Day ☀️ Relaxing Chillout House 2025 - 2026

Relationships - Beginning Core Data - raywenderlich.com

Relationships - Beginning Core Data - raywenderlich.com

The Windows 11 Disaster That's Killing Microsoft

The Windows 11 Disaster That's Killing Microsoft

Closures and Collections - Programming in Swift 4 with Xcode 9 and iOS 11

Closures and Collections - Programming in Swift 4 with Xcode 9 and iOS 11

Test Basics - Beginning iOS Unit and UI Testing - raywenderlich.com

Test Basics - Beginning iOS Unit and UI Testing - raywenderlich.com

Chillout Lounge Radio - 24/7 Live | Smooth Background Music | Focus, Study, Work, Sleep, Meditation

Chillout Lounge Radio - 24/7 Live | Smooth Background Music | Focus, Study, Work, Sleep, Meditation

How to store data in an iOS app? - Introduction to data persistence in Swift locally and with sync

How to store data in an iOS app? - Introduction to data persistence in Swift locally and with sync

Chillout Lounge - Calm & Relaxing Background Music | Study, Work, Sleep, Meditation, Chill

Chillout Lounge - Calm & Relaxing Background Music | Study, Work, Sleep, Meditation, Chill

Расслабляющая музыка помогает уменьшить стресс, беспокойство • Разум, тело🌸Музыка успокаивает нервы

Расслабляющая музыка помогает уменьшить стресс, беспокойство • Разум, тело🌸Музыка успокаивает нервы

Perfect Morning ❄️ Happy Winter Chillout Music for Good Vibes & Positive Energy

Perfect Morning ❄️ Happy Winter Chillout Music for Good Vibes & Positive Energy

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com