Questions tagged [nsurlsessionconfiguration]

An NSURLSessionConfiguration object defines the behavior and policies to use when uploading and downloading data using an NSURLSession object. When uploading or downloading data, creating a configuration object is always the first step you must take. You use this object to configure the timeout values, caching policies, connection requirements, and other types of information that you intend to use with your NSURLSession object.

An NSURLSessionConfiguration object defines the behavior and policies to use when uploading and downloading data using an NSURLSession object. When uploading or downloading data, creating a configuration object is always the first step you must take. You use this object to configure the timeout values, caching policies, connection requirements, and other types of information that you intend to use with your NSURLSession object.

It is important to configure your NSURLSessionConfiguration object appropriately before using it to initialize a session object. Session objects make a copy of the configuration settings you provide and use those settings to configure the session. Once configured, the session object ignores any changes you make to the NSURLSessionConfiguration object. If you need to modify your transfer policies, you must update the session configuration object and use it to create a new NSURLSession object.

NOTE In some cases, the policies defined in this configuration may be overridden by policies specified by an NSURLRequest object provided for a task. Any policy specified on the request object is respected unless the session’s policy is more restrictive. For example, if the session configuration specifies that cellular networking should not be allowed, the NSURLRequest object cannot request cellular networking.

For more information about using configuration objects to create sessions, see NSURLSession Class Reference.

141 questions
0
votes
0 answers

throwing a custom exception in a delegate method

I am trying to throw a custom exception in one of the delegate methods of NSURLSessionDateTask. -(void)loginWithEmail:(NSString*)email Password:(NSString*)password { @try { NSURL *Url = [NSURL…
Shradha
  • 991
  • 3
  • 13
  • 38
0
votes
1 answer

Error when submitting download task with background session in Swift

When I try to submit a download URL by using a background session created in this way: func backgroundSession() -> NSURLSession?{ var session:NSURLSession?; var configuration:NSURLSessionConfiguration!; if…
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
0
votes
1 answer

Check response value of NSURLSessionDataTask

I'm am a complete newbie to iOS development and am working on my first application. I am interfacing with a web service that requires a user to login with their username and password. I want to check and make sure that they have entered the correct…
user2604504
  • 697
  • 2
  • 14
  • 29
0
votes
2 answers

Having issue with multiple file downloads

Currently I'm implementing a file download application. In my application server there are around 2500 Resource files, I need to download those files from server to my document directory. My Code: @implementation DownloadManager { NSURLSession…
Midhun MP
  • 103,496
  • 31
  • 153
  • 200
0
votes
1 answer

SIGSEGV when calling [NSURLSessionDataDelegate resume]

I recently completed my first project using the new NSURLSession available on iOS 7. I built an app to explore the whole API of NSURLSession, implementing all kinds of tasks: - Data Tasks - Download Tasks - Uploaded Tasks I also implemented…
-2
votes
3 answers

Multiple web service calls at same time in iOS

I have 4 web services. I want to call these 4 services at a time. How can i call multiple web services at a time? Can you suggest any tutorial for regarding this? Thanks in advance.
vishnu
  • 715
  • 9
  • 20
1 2 3
9
10