Changing Download Path

Discussion in 'iOS Development' started by soccerstud92, Jul 17, 2010.

  1. soccerstud92

    soccerstud92 Member

    Joined:
    Jan 4, 2008
    Messages:
    219
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    My app, the Winterboard Theme Gallery or Theme Store, provides downloads of the themes in the gallery. To download, you must have the Safari-Download Plug-In, and then it installs into the Downloads directory. How could I change the directory they download into, and is there a way to eliminate the need for the plug-in?
    Any help is appreciated!
  2. Freerunnering

    Freerunnering Member

    Joined:
    Sep 1, 2009
    Messages:
    296
    Likes Received:
    0
    Device:
    4G iPod touch
    You'd probably have to add your own download manager for that?

    Though if not i'd like to know as i could use this too.
  3. soccerstud92

    soccerstud92 Member

    Joined:
    Jan 4, 2008
    Messages:
    219
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    HAHA, it would be nice IF I knew how to do that...
  4. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    Use NSURLConnection and your own custom download UI instead of the Download Plugin.
    Requiring the Download Plugin in an app like this just seems pretty "noobish" and not as straightforward as it should be.
  5. soccerstud92

    soccerstud92 Member

    Joined:
    Jan 4, 2008
    Messages:
    219
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    No kidding! This "project" started as a mobile version to my site, and now I'm trying to actually turn it into something.
    And before this, i never touched xCode, so now I'm searching for help and resources...Thanks for your reply, the NSURLConnection seems like it is sending me down the right path!
  6. Freerunnering

    Freerunnering Member

    Joined:
    Sep 1, 2009
    Messages:
    296
    Likes Received:
    0
    Device:
    4G iPod touch
  7. soccerstud92

    soccerstud92 Member

    Joined:
    Jan 4, 2008
    Messages:
    219
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    Hey thanks a lot for posting that, but I just so happened to find that lsat night right as I was about to go to bed.

    I also found this.

    http://developer.apple.com/mac/libr...RLLoadingSystem/Tasks/UsingNSURLDownload.html

    It is based of NSURLDownload

    What's the difference between NSURLConnection and NSURLDownload?
    Is the NSURLConnection download stuff automatically, or does it recognize when a downloadable file is opened.
    Does the NSURLDownload have to be specified by a specific link?
  8. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    Unfortunately, there is no NSURLDownload in iOS (Apple docs):
    Anyway, the difference between NSURLDownload and NSURLConnection is that NSURLDownload actually downloads a file and saves it to the filesystem for you. NSURLConnection provides you with the downloaded data (in memory) so you can choose what you want to do with it. You'll need to write it to the filesystem yourself, but that's not that hard.

    Also, sorry for not answering your PM yet

    Please Register or Log in to view images

    . If you want me to, I could help you further...
  9. soccerstud92

    soccerstud92 Member

    Joined:
    Jan 4, 2008
    Messages:
    219
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    I don't blame you...I was a bit nwby, and was swamped with redoing the UI of the app, long story, but during that time, I felt overwhelmed because, yes I am completely embarrassed that you have to use a plug-in, and then follow steps just to place it in the Winterboard directory. SOO I was going under the mentality that it will be this drawn out thing, Idk, it doesn't seem that difficult.

    Okay, so I would love to recieve help lol...Okay, so which path should I take...NSURLDownload, or Connection...since this is for jailbroken apps, I don't think Apple has much influence on whether or not I download to the filesystem. And the NSURLDownload looks like it will download a file, save it and according to that one page, unpackage it...Will this apply to .zips? And for this, what would a NSURL connection provide.
  10. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Downloading things is a very simple task using NSURLConnection. There are tons of tutorials all over, you just have to put some effort into looking for things.

Share This Page