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

  • Home
  • SEARCH
  • 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 3976616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:49:32+00:00 2026-05-20T04:49:32+00:00

I have a simple app that allows people to upload pictures to a server.

  • 0

I have a simple app that allows people to upload pictures to a server. For some reason, while it’s uploading each file the app freezes and won’t allow you to do anything else on it.

Is there anyway to run it in the background?

Thanks.

  • 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-20T04:49:33+00:00Added an answer on May 20, 2026 at 4:49 am

    On either iOS or Mac OS, you could handle that in a separate thread using NSThread, NSOperation, or libDispatch (on iOS 4 or Mac OS 10.6). There’s also pthreads, though I’m not sure whether that’s available on iOS. For more information, you might want to check this other question (which is aimed at iOS apps, but I think could apply equally well to Mac OS).

    Edit (response to comment): The simplest way (or I guess my preferred way, maybe it’s not so simple, or even a good idea) would probably be to use libDispatch and something like this:

    - (IBAction) beginUpload {
        // grab a global concurrent queue
        dispatch_queue_t globalQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, NULL);
        // throw a block in it
        dispatch_async(^{
                [self uploadImages];
            }, globalQueue);
    }
    
    - (void) uploadImages {
        // where I suppose images is an array of images or something
        @synchronized(images) {
            // upload stuff here, or copy images and then
        }
        // upload stuff here
    }
    

    Whether or not this is a correct way to do things, I don’t know. You would have to do further research for that (again, refer to the other question I pointed out above). Also, I’m not sure if that code is entirely correct, since I just wrote it up in a text editor without running it through a compiler.

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

Sidebar

Related Questions

The usual case. I have a simple app that will allow people to upload
I have a simple iPhone app that allows the user to upload images to
I have a simple app that allows people to post their new entry to
I have a simple app that allows the user to push a button that
I'm writing a simple App Engine app. I have a simple page that allows
I have a web app that allows people to register directly or by using
I have a relatively simple web app, that allows the user to enter two
I have a simple little email app that allows a user to pick certain
I have a multi-form app that gathers some information via AJAX and then allows
I have a blog-style app that allows users to tag each post with topics.

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.