Create, Store, Display

Discussion in 'iOS Programming' started by oo7ml, Apr 27, 2015.

  1. oo7ml macrumors 6502

    Jan 20, 2010

    I am building an app at the moment, that allows a user to take a photo or video which is then automatically uploaded as a pin on a map.

    I don't want the user to see and wait for a 'Uploading...' icon when they take a video and upload it, as it will make the app feel and look very slow and sluggish.

    Can anyone advise on what approach i could take that would allow the app to feel responsive and fast, while the photo / video uploads?

    Should i store the photo locally, upload it in the background... if so should i delete it from local storage as soon as it has finished uploading in the background so that when the user clicks on it, they are clicking on the database version, and not the local version?
  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Yes, that would be my recommendation.

    I say no. Why require the app to download a resource, possibly via a slow connection, when you already have a local version of it? (Which is what downloading it does: provides you with a local copy.) Only download resources for which you have no local version (or for which the local version is no longer as up-to-date).
  3. North Bronson macrumors 6502

    Oct 31, 2007
    San José
    The iPhone camera has pretty good resolution. Is it possible for you to downsize the images that you upload? Can increasing the JPEG compression leave you with an image that looks good enough?

    All you need right away to make the map look responsive is a small thumbnail over your pins. You could create that small thumbnail on your client and upload that before you kick off your video upload. Maybe you could display a small progress bar over the thumbnail to indicate that a concurrent upload is still in flight.

    Uploading in the background is the way to go for timed media. I agree with Dejo. Look up NSURLSession background transfers for more on this topic.

Share This Page