Questions tagged [nsurlsessiontask]
55 questions
0
votes
1 answer
How to delete an recipe in form of JSON from a server?
I write a code that get recipes in form of JSON from a server and present it into a UItable.
NSURL *url = [NSURL URLWithString:@"http://domain.com/recipes"];
[config setHTTPAdditionalHeaders:@{@"Authorization":@" Token…

MKH
- 153
- 1
- 3
- 15
0
votes
1 answer
Completion Handler of an NSURLSessionTask does not run
Hello I am trying to perform a simple authentication on a Java server from a swift client. The java server is an HTTPServer and its code takes a "POST" request with a Username and Password. The server returns true if the username and password are…

tbecker
- 5
- 4
0
votes
1 answer
iPhone NSURLSessionTask does not work on iOS 6
With the following code
NSURL *url = [NSURL fileURLWithPath: localFilePath];
NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithURL: url completionHandler:
^(NSData *data, NSURLResponse…

ort11
- 3,359
- 4
- 36
- 69
0
votes
1 answer
Force wait for NSURLSessionDataTask completion
I'm making a URLRequest that sends attempted login information and waits for a response from the web service to find out if the user can/cannot log in.
The way I was hoping to do this was by having the user type in his username & password into two…

13rave
- 135
- 2
- 15
0
votes
2 answers
Checking which kind of NSURLSessionTask occurred
I seem to be running into trouble. For some reason, If I try to check the class type of my NSURLSessionTask objects, it doesn't work at all. If I check their taskDescription properties, this works of course if I set them before initiating the task.…

klcjr89
- 5,862
- 10
- 58
- 91
0
votes
1 answer
If an iOS user is actively adding data to a view, what is the best way to retrieve this from the server?
I've created a quick application that lists Hotels and Rooms. I've created a backend with Rails and postgresql, and I've got it up on heroku. I'm using JSON to pass information back and forth betwene my iOS front end.
Here's what I'm wondering.…

chris P
- 6,359
- 11
- 40
- 84
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…

user361526
- 3,333
- 5
- 25
- 36
0
votes
1 answer
How to upload to ASP.NET in Objective-C using NSURLSession
I need to upload an image to my ASP.Net website, i have got it to work with NSURLConnection but when i needed to upload extremely big files, it crashes due to the lack of ram to transfer the file to NSData then upload it. So I found out about the…

user3001058
- 13
- 3
0
votes
1 answer
How would I best go about identifying specific objects when I come across them again?
Take NSURLSession's task objects:
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:self delegateQueue:nil];
NSURLSessionDataTask *dataTask1 = [session…
user2005643
-1
votes
1 answer
How to call custom method right before sessionTask resume in Alamofire
I need to record some data/info when Alamofire called resume to start the request.
(I used Swift in my project)
Is there anyway without do method_swizzling?
the timeline will be like this:
Call a request (put in request queue or execute right away)…

Paul.Chou
- 3
- 4