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

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

Related

Connect to file share on an Airport Extreme from iPad/iPhone

I need to connect to a hard drive or thumb drive that is plugged into an Airport Extreme. I assume you connect to it by using NSURLConnection, but I don't know how to format the url.
I can access it from the mac by connecting to the server smb://serveraddress.local etc... and entering user/pwd. I need to be able to access this using the iPad and stream video from it and open files.
If someone can point me in the right direction I would really appreciate it.
Thanks!
You are trying to connect AFP or SMB shared volumes, NSURLConnection can not help you.
Since there is no any SDK for you, you need to write your own AFP or SMB client.
Here is an Open Source AFP client: afpfs-ng
but I don't think you can run it on iPhone as easy as copy&past.

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

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.

Sending data between OSX and iPhones/iPads

I am wondering how I can send data between a machine and a mobile device. I know about the game kit an have read a bit about bonjour (but don't know to much about it), but would like to know some expert thoughts on what the best way is.
What I basically want to build is a one way traffic application that sends data from OSX to the mobile device (iPhone, iPod touch or iPad). The data send is either pictures, text (of a certain size and position ect) or video. The mobile device just has to receive this data and display it... nothing more.
My guess is that a WiFi solution would be best.
How could I best do this? Are there any tutorials that might help me putting this together?
Thanks in advance!
Best regards,
Paul Peelen
As no reply yet . . .
Bonjour is more focused on LAN networks, so would restrict you to WiFi.
It's also more of a service discovery standard - your Mac app would advertise the service on the LAN, and clients could see it - but your actual app communications will run on a different TCP socket, using whatever protocol is appropriate.
This linked answer may be helpful (although you will want CFNetwork in reverse - pushing from Mac to phone)
[iPhone]: How send output stream via wireless network?
For video you are probably better off looking for higher level frameworks (i.e. the AV ones).
Without knowing the full details of what you want to do, I wonder if rather than pushing data to the iPhone, the best thing would be to send a lightweight notification to the iPhone (AMQP, XMPP, or similar protocol) passing a URL back to the resource on the Mac - that way you could use standard HTTP GET for images, video, etc, on the iPhone side, throw the URL at a webkit view to display - and on your Mac side you could then use an off-the-shelf web server (Apache, or an embedded HTTP server within your code).

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.

iPhone to Mac Sync Over Wi-Fi

I am writing an iPhone application and would like to sync data over Wi-Fi between the iPhone and a complementary Mac application which I will also be writing (much like what is accomplished with Things and 1Password). To provide specific context, I need to be able to upload a CSV file to the iPhone application, have the ability to edit the data on the iPhone, and then re-download that file to the computer.
I am familiar enough with the mechanics of parsing and editing the CSV file once on the iPhone, but I am unsure how to approach the Wi-Fi sync between the iPhone and Mac. Obviously this is possible, since other applications have achieved the same thing, but do I need to setup some kind of server on the iPhone (which the Mac can talk to) or maybe a server in the Mac-side application (which the iPhone can talk to).
Any suggestions would be greatly appreciated. Thanks in advance.
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.
To do what you want, you will need to edit the code to return some other kind of data format (xml probably is the easiest) the call this from inside your app to get that data. CocoaHTTPServer easily take POST right out of the box too, so you can post an xml response as well.
After thinking about it, CocoaHTTPServer is best run on the computer side behind the scenes. the iphone can then send info to the computer where handling the code should be easier and you have more options.
On top of this you will want to look into Bonjour, it will allow the computer and the iphone to discover each other without too much difficulty. (ie by advertising their info on the network)