nsurlsessiondatatask Questions
3
Solved
This is what Apple's documentation says regarding suspend method of NSURLSessionTask class
A task, while suspended, produces no network traffic and is not subject to timeouts.
Ok. So I'm runni...
Inspector asked 17/11, 2016 at 18:5
4
Solved
I have a simple GET request that I am trying to run in my macOS application. However I keep getting the following error:
A server with the specified hostname could not be found.
The URL I am tryi...
Bearden asked 27/10, 2017 at 9:29
1
Solved
In swift how do I throw an error within a completion handler like this:
let task = URLSession.shared.dataTask(with: request as URLRequest, completionHandler: {
(data, response, error) in
do {
...
Oread asked 9/7, 2018 at 9:57
4
Solved
I'm trying to implement this tutorial which implements a custom NSURLProtocol with NSURLConnection.
https://www.raywenderlich.com/76735/using-nsurlprotocol-swift
It works as expected, but now tha...
Collocate asked 30/3, 2016 at 1:0
2
Using XCode-8.2.1, Swift-3.0.2 and iOS-10.2.1,
I am trying to call two different URLSession.shared.dataTasks (the first is a simple URL-request and the second is a POST-request).
Since my first d...
Redingote asked 5/2, 2017 at 19:36
4
I am using URL background session for pdf uploading as data stream, using ios version > 9.0. I am setting timeout interval of 300 sec. Its not working at all. After 10 seconds it gets timeout error...
Conflict asked 23/11, 2017 at 8:0
2
I'm fairly new to iOS/Swift development and I'm working on an app that makes several requests to a REST API. Here's a sample of one of those calls which retrieves "messages":
func getMessages() {
...
Jabon asked 19/10, 2017 at 15:5
3
I'm currently implementing offline streaming with FairPlay streaming. Therefor I'm downloading streams using an AVAssetDownloadTask.
I want to give the users feedback about the size of the downlo...
Cologarithm asked 19/9, 2016 at 10:59
1
I am making requests to my server using the following code:
let configuration = URLSessionConfiguration.default
let session = URLSession(configuration: configuration)
let dataTask = session.dataTa...
Junction asked 26/10, 2017 at 12:19
1
Solved
This My Test cases, point out that when using NSURLSession with a HTTP/2 connection there is memory problem.
test1: iOS 9. HTTP/2 server
I use NSURLSession to upload 10M file to a HTTP/2 server,...
Hett asked 9/9, 2016 at 10:22
1
Solved
I have flight search feature in my application which is taking too long to get the data (more than 25 seconds). if application goes background or went to sleep mode, internet connection get disconn...
Chiefly asked 22/9, 2016 at 12:37
1
I tried this code in my project to download large files in background and it works fine. I start downloading in UIViewController. If I go to another view and back to the UIViewController ,it stop r...
Salisbury asked 10/5, 2016 at 13:13
1
Solved
I started to use NSURLSession by avoiding NSURLConnection now a days as it's a new and elegant API provided by Apple. Previously, I used to put call NSURLRequest in GCD block to execute it in backg...
Concertmaster asked 31/7, 2015 at 12:28
4
Solved
I am creating a NSMutableRequest:
self.req = [NSMutableURLRequest requestWithURL:myURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10.0];
The timeout is set to be 10 seconds ...
Branham asked 15/7, 2015 at 10:30
1
© 2022 - 2024 — McMap. All rights reserved.