Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:35:40+00:00 2026-05-25T09:35:40+00:00

I am working on application called Messanger. My task is to upload and download

  • 0

I am working on application called “Messanger”.

My task is to upload and download data from and to a server ..
I am new to this, so I don’t know how to do it.

  1. I want to share data with server (upload)
  2. I want to get data from server (download)

Can anyone help me with this ??
I need code for this.

Thanks in Advance ..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:35:41+00:00Added an answer on May 25, 2026 at 9:35 am

    You can use classes provided in official sdk.

    0) Common part.

    First of all you should create NSURLRequest. For example, NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"apple.com"]];

    1) Uploading data.

    When you want to send some data you can use this in following way (for example, sending xml):

    NSString *message = [[NSString alloc] initWithFormat:@"<?xml version=\"1.0\" ?>\n<parameters></parameters>"];
    NSData* msgData = [message dataUsingEncoding:NSUTF8StringEncoding];
    NSString *msgLength = [NSString stringWithFormat:@"%d",[msgData length]];
    
    [request addValue:@"application/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
    [request addValue:msgLength                         forHTTPHeaderField:@"Content-Length"];
    [request setValue:@"iOsApp"                         forHTTPHeaderField:@"User-agent"];
    
    [request setHTTPMethod:@"POST"];
    [request setHTTPBody:msgData];
    [message release];
    

    2) Downloading data.

    Now you should start connection:

    [NSURLConnection connectionWithRequest:request delegate:self];
    

    3) implement needful delegate methods. And at last you should implement that delegate methods that you would need. For example, in method - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data you will merge received data, in methods - (void)connectionDidFinishLoading:(NSURLConnection *)connection and - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error you should process received data.

    For complete list of all methods that you could implement to receive more information about your internet connection and handle different process (like authentication, response code and other) read official documentation : NSURLConnection

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a client/server application where the connections from the client to the
I'm working on a application which will export my DataGridView called scannerDataGridView to a
Greetings, I'm working in windows application using C#. I have typed-dataset called packetsDBDataSet and
I'm currently working on an OO PHP application. I have a class called validation
I was recently working with a product from Symantech called Norton EndPoint protection. It
I'm very new to android development and I'm working on an application where I
I am working on an SMS Sending application and for login purpose i want
I am working on Client Server application. There are lots of command exchanged between
I'm working on an application that contains several server sockets that each run in
I want to automate a program called Spotify from C#, the best way (I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.