사과
  • 애플 개발자 문서 한글 번역
  • App Frameworks
    • Foundation
      • 숫자, 데이터와 기본값
      • 문자열과 텍스트
      • 컬렉션
      • 날짜와 시간
      • 데이터 포맷
      • 작업 관리
        • Operation
        • OperationQueue
        • Timer
      • 리소스
        • Bundle
      • 파일 시스템
        • FileManager
      • Notification
        • NSKeyValueObserving
      • URL 로딩 시스템
        • 웹사이트 데이터를 메모리에 저장하기
        • URLSession
          • URLSessionConfiguration
            • urlCache
            • requestCachePolicy
          • configuration
        • URLSessionTask
        • URLRequest
        • URLResponse
        • HTTPURLResponse
        • 캐시 데이터에 접근하기
        • CachedURLResponse
        • URLCache
      • Object Runtime
        • NSValue
    • UIKit
      • UIKit으로 앱 개발
      • 앱과 환경
        • 앱 라이프 사이클 관리하기
        • 앱 실행에 대응하기
        • UIApplication
      • 문서, 데이터와 클립보드
      • Mac Catalyst
        • iPad 앱을 Mac 버전으로 만들기
        • 아이패드 앱의 맥 최적화
      • 뷰와 컨트롤
        • UIView
        • Table Views
          • UITableView
          • UITableViewCell
          • UIRefreshControl
        • UIScrollView
      • View Controllers
        • UIViewController
        • UITableViewController
        • UISearchController
      • 애니메이션과 햅틱
        • 프로퍼티 기반 애니메이션
          • UIViewPropertyAnimator
        • View controller 전환
      • 터치, 누르기, 제스처
        • UIResponder
        • UIKit 제스처 처리
        • 다중 제스처 인식기 조정
        • UILongPressGestureRecognizer
        • UIPanGestureRecognizer
          • maximumNumberOfTouches
          • minimunNumberOfTouches
          • translation(in:)
          • setTranslation(_:in:)
          • velocity(in:)
        • UIGestureRecognizer
    • Swift
      • 스위프트 표준 라이브러리
        • 메모리 직접 관리
          • 포인터 파라미터를 사용하는 함수 호출
          • UnsafePointer
          • UnsafeMutableRawBufferPointer
    • SwiftUI
      • 뷰와 컨트롤
        • View
        • Text
        • TextField
      • 뷰 레이아웃과 표현
      • 그리기와 애니메이션
      • 프레임워크 통합
      • 상태와 데이터 흐름
  • Graphics and Games
    • Core Animation
      • CALayer
      • CAAction
      • CAShapeLayer
      • CADisplayLink
    • Core Graphics
      • CGFloat
      • CGPath
  • App Services
    • Combine
    • WebKit
      • WKWebView
  • Media
    • AVFoundation
      • 시스템 오디오 상호작용
        • AVAudioSession
          • AVAudioSession.Category
            • ambient
            • multiRoute
            • playAndRecord
            • playback
            • record
            • soloAmbient
          • AVAudioSession.Mode
      • AVFoundation 자료형
  • Documentation Archive
    • 번들 프로그래밍 가이드
      • 번들에 대해
      • 번들 구조
    • Key-Value Observing 프로그래밍 가이드
    • Threading 프로그래밍 가이드
      • About Threaded Programming
      • Thread Management
  • ETC
    • Not Found
Powered by GitBook
On this page
  • Declaration
  • Summary
  • Discussion
  • 같이 보기
  • 세션 생성하기
  1. App Frameworks
  2. Foundation
  3. URL 로딩 시스템
  4. URLSession

configuration

session configuration 객체의 복사본

PreviousrequestCachePolicyNextURLSessionTask

Last updated 5 years ago

원문 출처

Declaration

@NSCopying var configuration: URLSessionConfiguration { get }
@property(readonly, copy) NSURLSessionConfiguration *configuration;

Summary

SDKs

  • iOS 7.0+

  • macOS 10.9+

  • tvOS 9.0+

  • watchOS 2.0+

Framework

  • Foundation

Discussion

iOS 9, OS X 10.11 버전부터 URLSession 객체는 초기화될 때 넘겨받은 URLSessionConfiguration 객체를 내부에 저장하기 때문에 초기화 이후에는 configuration을 변경할 수 없습니다. 세션 초기화 메서드에 전달된 configuration 객체 또는 세션에서 반환된 configuration의 속성을 변경하더라도 세션의 동작에는 영향을 주지 않습니다. 하지만 수정된 configuration 객체로 새로운 세션을 만들 수는 있습니다.

이전 버전의 iOS나 macOS에서는 URLSession객체가 구현 시의 버그로 인해 초기화 메서드에 전달된 configuration 객체의 복사본이 아닌 참조를 저장했습니다. URLSession 초기화 메서드에 전달되었거나 configuration 속성에서 반환된 객체에 대해 명시적으로 copy()를 호출함으로써 플랫폼간의 일관적인 동작을 보장할 수 있습니다.

같이 보기

세션 생성하기

  • init(configuration: URLSessionConfiguration) 특정 session configuration으로 세션을 생성합니다.

  • init(configuration: URLSessionConfiguration, delegate: URLSessionDelegate?, delegateQueue: OperationQeueu?) 특정 session configuration과 delegate, delegateQueue로 세션을 생성합니다.

class URL session의 동작과 정책을 정의하는 configuration 객체

https://developer.apple.com/documentation/foundation/urlsession/1411477-configuration
URLSessionConfiguration