Xcode: Upload text to FTP server>???

Discussion in 'iOS Programming' started by nichlaspro, Jan 29, 2015.

  1. nichlaspro macrumors member

    Joined:
    Jan 21, 2015
    #1
    Hi all!

    How can you upload some text or just a local text file to your FTP server?

    Because i can't find the answer on google;-)

    Thanks!

    (JUST ASK IF U WANT MORE INFO)

    Edit: It's because I want to store some user data and they should not be able to edit that information....
     
  2. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #3
    It's not a must to use ftp for me..

    But I just want a way to send data that the user has written to a place where I can see that but not the user.. So I need a way to store user data without the user will be able to change the text/information before sending the info to me..

    Because the only way to send user data to me, is to make them send me a mail but they can edit the text before they send it...

    That's not what I want, so someone please help me fixing this and np if u can't understand some of my pretty bad English;-)

    Thank!!!

    ----------


    What else could I use??
     
  3. DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #4
    If you have some basic knowledge of php you can do a lot of things like that ;-) Even build an database of the information you are lookig for to store.

    lookup NSURLConnection for sending info to an page.
    If any help wished, I'm here somewhere :)
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    How big is the data (in bytes)?

    Maybe you can use HTTP POST.
     
  5. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #6
    But I don't have any http sites??

    ----------

    It's just a text file with two lines...

    But I do not have a http server....:-((( Just want a smart way to do the sending..
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    But you do have an FTP server?

    You're not explaining things completely here. You need to lay out the whole thing: what you have, what you want, etc.


    Two lines is easily done by HTTP POST. You can build an HTTP service on Google's App Engine. There are other service providers, that's just one example.
     
  7. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #8
    I'll quickly try that and response back after that...

    ----------

    Annnddd I do have an ftp server.

    What I want is a simple way to store user written data to some kind of server when they have clicked a button.
     
  8. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #9
    uhhh... weird.

    How about parse.com?
     
  9. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #10
    Apple has sample code for ftp called SimpleFTP. There is plenty of iOS FTP sample code on the net. I think you can send data to an ftp:// url with the usual NSURLConnection methods and it will work.

    Having said that, you want to arrange things so one user doesn't overwrite the file that another user sent. ftp is not usually the correct answer.
     
  10. AppSwage macrumors newbie

    Joined:
    Jan 18, 2015
    #11
    From your initial post you seemed most concerned with the user's ability to edit the data. If that's the issue and not that you want access to it than you could store data in the keychain. The only reason to store data on a server is if you need to use it outside the app.
     
  11. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #12
    Okay wait, let's say we need to store the users username and password online..

    But where? Would do that ftp, http or something else??

    Thanks!

    ----------


    No, wait. I do not want to pay, do not have so much money but any other way I can store something like a username and a text like his/her phone number, just to give an example??

    ----------

    And my will will only be sending a very small text information to some kind of server or what you thing you should for that. It shall not be retrieving data, only be sending.

    But how?

    Thanks!

    ----------

    What then?
     
  12. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #13
    GameCenter?
    WebApp?
    https post to webapp?
    parse.com?
    mongolab.com?
     
  13. nichlaspro, Jan 29, 2015
    Last edited: Jan 29, 2015

    nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #14

    Thanks!!!!!!! Ok, let's say l use Mongolab.com, but what shall I then do and how can I use it??
    Or parse??

    Thanks!!!
     
  14. DannyBres macrumors 65816

    DannyBres

    Joined:
    Oct 30, 2007
    Location:
    UK
    #15
    I had a similar problem.

    My data was just about usage of a webservice and all anonymous, so security wasn't a huge concern. I do it with POST to a php script that stores it all in a MySQL database. IMO, that is what you want/should do to, I'd be scared compiling ftp credentials into an app (not sure why, just doent seem right).

    I'm sure you could implement my approach for free, no idea where though, maybe you can use heroku?

    If it is a username and password... plain text on an FTP server is not the way to do that and it is not scalable at all!

    Who is going to be using it? How many users? Why do you have no budget? Will this be a commercial app?
     
  15. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #16
    Check parse.com, they have their documentation there, it is easy to follow
     
  16. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #17
    I'll try, thanks!!! I REALLY APPRECIATE ALL YOUR TIME AND HELP
     
  17. nichlaspro thread starter macrumors member

    Joined:
    Jan 21, 2015
    #18
    AHH THANKS GUYS! I'm using parse right now to upload data and it works like charm!

    THANKS!!!!!

    You guys are great!
     

Share This Page