https://developer.apple.com/documentation/foundation/url_loading_system
URL Loading System | Apple Developer Documentation
Interact with URLs and communicate with servers using standard Internet protocols.
developer.apple.com
URL Loading System
Interact with URLs and communicate with servers using standard Internet protocols
- 표준 인터넷 프로토콜을 사용하여 URL과 상호작용하고 서버와 통신합니다.
The URL Loading System provides access to resources identified by URLs, using standard protocols like https or custom protocols you create
- URL Loading System은 https나 사용자 정의 프로토콜과 같은 표준 프로토콜을 사용하여 URL로 식별된 리소스에 대한 접근을 제공합니다.
Loading is performed asynchronously, so your app can remain responsive and handle incoming data or errors as they arrive
- 로딩은 비동기로 수행되므로, 앱이 응답할 수 있는 상태로 유지하고, 수신된 데이터나 에러가 도착하는 대로 처리할 수 있습니다.
You use a URLSession instance to create one or more URLSessionTask instances, which can fetch and return data to your app, download files, or upload data and files to remote locations
- URLSession 인스턴스를 사용하여 하나 이상의 URLSessionTask 인스턴스를 생성할 수 있습니다.
- URLSessionTask 인스턴스는 데이터를 앱으로 가져오고 반환하고, 파일을 다운로드하거나 데이터와 파일을 원격 위치로 전송 할 수 있습니다.
To configure a session, you use a URLSessionConfiguration object, which controls behavior like how to use caches and cookies, or whether to allow connections on a cellular network
- session을 구성하기 위해 URLSessionConfiguration 객체를 사용합니다.
- URLSessionConfiguration으로 셀룰러 네트워크에서의 연결 허용 여부나 캐시 및 쿠키 사용 방법 같은 동작을 제어할 수 있다.
You can use one session repeatedly to create tasks.
- 하나의 session을 반복적으로 사용하여 작업(task)을 생성할 수 있다.
For example, a web browser might have separate sessions for regular and private browsing use, where the private session doesn’t cache its data
- 예를 들어, 웹 브라우저는 일반 브라우징과 비공개 브라우징 사용을 위한 별도의 session이 있을 수 있다. 비공개 session은 해당 데이터를 캐시하지 않는다.
Figure 1 shows how two sessions with these configurations can then create multiple tasks
- 그림 1은 이러한 구성을 갖는 두 세션이 어떻게 여러 작업을 생성할 수 있는지 보여준다.

Each session is associated with a delegate to receive periodic updates (or errors)
- 각 세션은 정기적인 업데이트를 수신하기 위해 delegate와 연결된다.
The default delegate calls a completion handler block that you provide; if you choose to provide your own custom delegate, this block is not called
- 기본 delegate는 사용자가 제공하는 완료 핸들러를 호출한다. 자신만의 사용자 정의 delegate를 제공하는것을 선택했다면 이 블럭은 호출되지않는다.
You can configure a session to run in the background, so that while the app is suspended, the system can download data on its behalf and wake up the app to deliver the results
- 백그라운드에서 실행되도록 세션을 구성하면 앱이 일시 중지되고 시스템이 대신 데이터를 다운로드하고 앱을 깨워 결과를 전달할 수 있다.
'iOS' 카테고리의 다른 글
URLSession 번역 (0) | 2024.12.13 |
---|---|
Fetching website data into memory (0) | 2024.12.10 |
SwiftGen 사용 (0) | 2024.11.26 |
[iOS][버그해결] 이중으로 들어간 CollectionViewCell안 CollectionViewCell이 재사용되는 버그 (0) | 2024.11.16 |
[iOS] Alamofire 문서번역 (0) | 2024.11.06 |