Re: Upload Progress from NSURLConnection
Re: Upload Progress from NSURLConnection
- Subject: Re: Upload Progress from NSURLConnection
- From: Gordon Apple <email@hidden>
- Date: Mon, 31 Oct 2011 12:58:59 -0500
- Thread-topic: Upload Progress from NSURLConnection
Title: Re: Upload Progress from NSURLConnection
Wow! Thanks.
This doesn’t show up at all in the iOS 5 Reference docs. However, I did find it in the NSURLConnetion header. I did finally manage to get my progress bar working. This was for uploads to Twitter, mainly when there are media files attached and the user has a slow connection.
On 10/31/11 4:01 AM, "Quinn "The Eskimo!"" <email@hidden> wrote:
On 30 Oct 2011, at 15:43, Gordon Apple wrote:
> Looking the WWDC video for Twitter, there is an option for using a signed request from a TWRequest which they show getting upload progress from an NURLConnection using “connection:didSendBodyData:totalBytesWritten:TotalBytesExpectedToWrite” delegate. However, this is marked in the docs as a deprecated method.
In iOS 5 (and Mac OS X 10.7) we introduced a major reshuffle of NSURLConnection delegate callbacks. The old informal protocols were removed, replaced with new formal protocols. This has caused a lot of confusion because our documentation systems aren't subtle enough to understand the transition. However, in most cases the delegate /methods/ haven't changed, so as long as you keep using the correct method everything works fine.
> There seems to be a similar replacement for a downloaded delegate protocol, but nothing to replace this for uploads. Have I missed it somewhere?
The -connection:didSendBodyData:xxx method is now in the the NSURLConnectionDataDelegate formal protocol, and that applies to both uploads and downloads.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden