Page 1 of 1

File transfer between iOS and Desktop over Wifi

Posted: Sun Jan 16, 2011 12:27 pm
by andyh1234
Hi,

Does anyone have any suggestions how I could get a file transfer to work between iOS and a desktop using Livecode over a local network?

Ive seen this does in a lot of apps so you can press a sync button on the iOS device and it seems to look for a computer on the network, then returns a list of available computers, you select one and the sync (or file transfer) happens.

Is there a way of finding the local IP number on the iOS device as I assume at worst I could use that and simply get the device to cycle through the IP, trying to open a web page at say 192.168.0.xxx where xxx keeps increasing, then when it does check that web page is one provided by a mini server running at the desktop app and send data to and from the app that way.

Thanks

Andy

Re: File transfer between iOS and Desktop over Wifi

Posted: Sun Jan 16, 2011 1:40 pm
by andyh1234
Just following on.

I tried some come Mark sent a while to check a computer has a connection to get the ip address as follows...

put "255.255.255.255:44444" into mySock
open datagram socket to mySock
put hostAddress(mySock) into myIP1
close socket mySock

This works on the desktop, however in the iOS simulator and device it returns 'not an open socket'.

Any ideas?

Re: File transfer between iOS and Desktop over Wifi

Posted: Sun Jan 16, 2011 5:08 pm
by Klaus
Hi Andy,

looks like noone ever cares to read the Release Notes :roll:

#####################
What does not work
The following features have no effect:
...
socket syntax and functionality (planned for a future release)
...
####################

Best

Klaus

Re: File transfer between iOS and Desktop over Wifi

Posted: Sun Jan 16, 2011 6:03 pm
by andyh1234
Off to read them again now, I must have missed something.

Re: File transfer between iOS and Desktop over Wifi

Posted: Sun Jan 16, 2011 6:17 pm
by andyh1234
OK, sorry about that.

Having now found and read the release notes I can see sockets are not supported in the iOS release yet.

Is there any other way anyone can think of to get the devices local IP address? Once I have that I could set up a web server on the same local network and use the web browser get, post etc to transfer the data to and from the device, but I need to get that initial ip range to be able to look for other devices on the same network that are running my server.

Im just hoping there is some way of getting the ip address, but it doesnt look promising now.

Thanks

Andy

Re: File transfer between iOS and Desktop over Wifi

Posted: Thu Sep 15, 2011 11:04 am
by seaniepie
The new iOS SDK helps a lot. There is even a built in Socket demo to help you along the way. In fact, I have found it to be a full solution for me. Not only for File Transfer but also for Data transmit ion to RS232 devices over WiFi. Thanks you lovely RunRev people.
Pi

Re: File transfer between iOS and Desktop over Wifi

Posted: Thu Sep 15, 2011 11:11 am
by andyh1234
Yes, im using the sockets as well now for data transfer, they work well.