I wish upload a file into my iphone app via ftp ( wifi connection on iphone) like some program as airsharing or iFiles..
which are the first steps to do this??
thanks in advance
The iPhone SDK does not have a built-in FTP server, so you will have to implement a simple FTP server yourself.
First, get an overview of the FTP protocol on Wikipedia. Read the actual RFCs, which document the protocol, in the 'Further Reading' section. Some of the external links are helpful for understanding the flow of an FTP transfer.
Next, brush up on iPhone socket communication. The Apple documentation for CFSocket is a good starting point. Consider using the AsyncSocket library to ease implementation.
You would begin by creating an FTP server in your application.
Related
I want to establish socket connection between iphone and a web service that has its own IP address, service name (e.g "_abc._tcp"), and it also contains information about files stored. How can I do this? Can you please help with some sample code or links.
My goal is to develop an application that will get a video file from that server to my iphone and play it.
At first I try to get information of the files but I don't know how to connect to that server and make the video played on my iPhone.
Many thanks in advance
There is a great library for socket programming in objc here CocoaAsyncSocket
Which will help you out a lot. The examples also show how to use NSNetServices to broadcast a Bonjour service.
I'd like to play with the idea of creating a server program that communicates with an iPhone app over socket connections. I've found several guides within Apple's documentation for client side programming (with CFNetwork, NSStream, etc) but I don't know where to begin on programming the server application, or even what language to use, or for that matter, how to deploy and run a server application on my current web hosting package through Go Daddy. A simple instant messenger style application example should get me started, but any advice is appreciated.
if you want to create socket connection is better to use CFNetwork , it has more flexibility for you I already used NSURLConnection but CFNetwork has better performance. this is my steps and how I developed my app :
configuration of server
selection C++ for my server side (service)
start to develop a client-side app for iphone to connect to server using NS classes
but I had some problems in sending and receiving message to and form server . so I changed it to CF classes it works better and faster now.
The easiest way to handle server-to-device communications is to use APNS (Apple Push Notification Services).
Communication in the other direction (device-to-server) can be handled simply with NSUrlConnection.
If you want to write your own socket code for this, well - good luck with that.
Do you want your client application to be able to run on more than one OS? If so, you might want to stay clear of anything Apple specific. Although, if you strictly want to run on iOS, using MusiGenesis' suggestion could save you a ton of time.
I have found that Python and Perl are both pretty great for socket programming. I know that Python has several libraries built in for handling HTTP requests etc. If you want to run your server as a daemon, I found this code very helpful:
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
Here is a general python sockets guide:
http://docs.python.org/howto/sockets.html
Good luck.
Can we set up HTTP server on iPhone for audio streaming . I need to set up my iphone as a http server where i have to upload the audio buffer and do the live http streaming
Since Apple's HTTP Live Streaming is based on static files, you can use a HTTP Server. There are at least a couple: cocoahttpserver, CocoaHTTPServer, and you can read how to do yours.
Or you can program the whole thing using socket programming and bonjour, so clients can find each other. Apple has an example project to send pictures between iphones whose name I don't remember. :P You can read more about it in Network Programming: Chapter 7 - iPhone SDK Application Development
Socket programming is close to C, and needs a bit more work than UIKit.
i have successfully built/config'd/run lighttpd on iPad and had it serve an HTTP Live Stream as well. it was pretty straight forward... just get the source, massage the config, make, then fiddle with the install and it just worked.
I want to write an app to communicate between the iPhone and a Windows pc. Where can I find more information on that particular communication?
Your best bet I beleive is to just use the network. If you're doing something nice and simple HTTP might even work for you. If you need to transfer files they NFS or FTP.
I found the following link:
Bonjour for .net
I tested the sample app and it communicates with my iPhone. I will digg more in that on the next day or tow and will inform you.
I have made Iphone applicatio. In my application whatever data i have recorded; all that data i want to export to the Computer using the application.
Is there any way available to sent data to computer using wifi using developed application? Can we use Bluetooth or Http connection to send application from device to the PC?
if we can than how can we manage the bluetooth and how to use it without Jailbreaking?
if any body has any solution,please give any code or any link or any other solution which would appreciated.
Thanks,
Mishal
Your best bet is to send the data using HTTP or FTP to a server, which could be your PC. Would that work for you?
Here's one way to do it.
Here's another.
And one for FTP.
I dont think you have an option to gain control of a computer and toss a file in there from within an iPhone app. You cannot do it over the usb cord, you cannot mount the drive unless you roll your own fs mounter (pretty difficult), and you cannot push a file over html or something and have it magically appear. The user would have to interact at some point.
Many times, this is done over html. In my apps, I use CocoaHTTPServer to get local info into and off of the phone. You run the server and out-of-the-box, it indexes all the files in the documents directory for you to download from any browser on the same wifi network. Give it a shot as it is a easy to implement solution for getting large files off the phone without having to resort to something clunky like email