How to send data from iphone to MAC/PC via serial port? - iphone

I'm new to these things, and have no idea how to achieve this thing.
I want to send some data from iphone to MAC/PC and also want to receive data sent from MAC to iphone.
Please help me out or give me some clue, where I can start from.

Most apps solve this issue by including a small http server in the app and providing a web interface to upload/download data to the app.

Related

Share text between iPhone and other phones using wifi

Is it possible to send and receive data between iPhone and other phones such as blackberry or android over wifi. I am on the move it to create an iPhone app with the above functionality. Can any one has previous experience in this, or any sample codes to do this. I have searched a lot but couldn't find anything relevant.
you can do this by using a server application. So the iphone pushes the data to the server and the other devices are either getting push notifications or something similar or simply poll for the data.
Without a server, you have the trouble of finding the other devices. If its safe to assume they are all on the same subnet, then you could use a UDP broadcast to do this.
There's many ways of doing this, every one with its own pitfalls. So there's no generic answer to this question without knowing in more detail what's the purpose of it.

Send data to a SPECIFIC iPhone application through mobile network (No Internet)

I am looking for a way to send data to a SPECIFIC iPhone application without going through Internet... thus using the mobile network.
Thanks.
No chance. There's only two things the phone is actually receiving: calls and text messages. Both cannot be used for what you like to do, since neither can be routed to any app.
You can't even really keep an open socket to allow connections through the internet, since the new multitasking is not really multitasking and allows listening for new data only for a few types of applications, voip clients for example. But you didn't want internet anyway...
Best you can do is text the phone a URL whose schema is registered to your app.

iPhone - Browsing iPhone files through computer

I want to be able to send files from an iPhone app to a computer. What would be the easiest way of doing this?
I've made simple server client programs before, but in those, the client has always needed to connect to the server before being able to receive messages from it. There is an app for the iPhone called iSimulate, where you put a server on a Mac (the iPhone simulator), and then you use the iSimulate app of an iTouch or iPhone to send touch events to the server. This app does not require you to type in an ip-address. Instead it presents a list of available computers that have this server up and running.
How exactly is this being done? Can a server broadcast a message over a network, w/o anyone being connected to the server? How does that work? How does a client listen for that broadcast?
Here's a video of the app I'm talking about:
http://www.youtube.com/watch?v=N3Qpd1ycZh4
alt text http://a1.phobos.apple.com/us/r1000/051/Purple/7b/07/70/mzl.mvwjifyc.320x480-75.jpg
That app may be using Bonjour.
I've seen similar apps use a peer-to-peer Bluetooth connection to exchange files between a iPhone and a desktop.

How to Share Files Between my iPhone App and a Mac/PC

I have developed an iPhone app which stores photos in the /Documents directory of my app.
I would like to add a feature which gives to the user the opportunity to transfer those pictures to his/her PC or Mac.
I don't really know how to do that.
What is the best way, using Bonjour, bluetooth, or directly USB (if it is possible) ?
I really need some advices on that point ...
Any ideas ?
PS: Forgive my English, I am French :-)
Try NSNetService to register the service in Bonjour, and NSFileHandle to send data over a socket connection associated with the service.
If you do not want to write a Mac or PC part for your app then you can also consider to build in a little http server that people can use to access the data in your app. There are some nice open source http servers available for Cocoa which you can find with Google.
Using Bonjour you can advertise your http server so that people can easily find it with a Bonjour enabled browser like Safari. (Your iPhone app's web server will appear automatically under the dynamic bonjour bookmarks items)
You've edited the question to say that it's about transferring photos. Could you store the photos on the iPhone's photo roll with UIImageWriteToSavedPhotosAlbum(), and let Apple handle getting them onto the computer?
Bonjour!
I mean that both as a greeting and an answer. You have to setup a bonjour connection over wifi to transfer files directly to and from an app. That's actually pretty simple to do on both the iPhone and Mac side. The PC is a little tougher.
You can do bluetooth but bluetooth capability is still fairly rare on desktops.
Without knowing more about your specific application, I agree with Graham Lee--either directly saving to the Camera Roll or giving the user an option to save one or more photos to the Camera Roll is much simpler than http/bonjour.

how to export data to computer(PC) using wifi or http connection?

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