Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
Internet file reading problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Nethfel" data-source="post: 1259912" data-attributes="member: 89124"><p>You need to implement the delegate methods that actually will store the data. </p><p></p><p>You need to store the NSMutableData object as an IVar and not a local variable in that method that you create the request. </p><p></p><p>Since this is an ASYNC request, data will be received in the background while your app is allowed to continue to run. The delegate methods give you the ability to store the data as it arrives, reset the data when appropriate, complete the process when appropriate and provide error messages should there be a problem.</p><p></p><p>You need to read this page:</p><p></p><p><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html" target="_blank">Loading&#133;</a></p><p></p><p>that will give detailed information on the delegate methods you need to implement.</p><p></p><p>Just remember, you won't have valid data where you're currently doing the length test.</p></blockquote><p></p>
[QUOTE="Nethfel, post: 1259912, member: 89124"] You need to implement the delegate methods that actually will store the data. You need to store the NSMutableData object as an IVar and not a local variable in that method that you create the request. Since this is an ASYNC request, data will be received in the background while your app is allowed to continue to run. The delegate methods give you the ability to store the data as it arrives, reset the data when appropriate, complete the process when appropriate and provide error messages should there be a problem. You need to read this page: [url=http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html]Loading…[/url] that will give detailed information on the delegate methods you need to implement. Just remember, you won't have valid data where you're currently doing the length test. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
Internet file reading problem
Top