开发者

How can I upload a string to an FTP server and save it there from within an iPhone app?

I've been attempting this for a week now, and it seems the more I ask online, the more confused I get, and the more the answers vary. Because of this, I'd like to ask just a simple question: How can an iPhone app that has an XML file saved in an instance of NSString send it from the iPhone to an FTP server? I mean, what APIs or tools can I use to do this?

Please suggest the simplest ones as I'm new to iPhone development. I would appreciate any guid开发者_如何学运维ance.


I would first try using -[NSString writeToURL:atomically:encoding:error:] with an ftp: scheme URL.

If that failed, I would use CFFTPStream, which is expressly designed to work with FTP.

You might want to check out s7ftprequest or Apple's Simple FTP Sample project. Both were suggested by answers to "Upload File to FTP Server on iPhone".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜