File transfer between iOS and Desktop over Wifi

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

File transfer between iOS and Desktop over Wifi

Post by andyh1234 » Sun Jan 16, 2011 12:27 pm

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

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: File transfer between iOS and Desktop over Wifi

Post by andyh1234 » Sun Jan 16, 2011 1:40 pm

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?

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: File transfer between iOS and Desktop over Wifi

Post by Klaus » Sun Jan 16, 2011 5:08 pm

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

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: File transfer between iOS and Desktop over Wifi

Post by andyh1234 » Sun Jan 16, 2011 6:03 pm

Off to read them again now, I must have missed something.

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: File transfer between iOS and Desktop over Wifi

Post by andyh1234 » Sun Jan 16, 2011 6:17 pm

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

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: File transfer between iOS and Desktop over Wifi

Post by seaniepie » Thu Sep 15, 2011 11:04 am

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

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: File transfer between iOS and Desktop over Wifi

Post by andyh1234 » Thu Sep 15, 2011 11:11 am

Yes, im using the sockets as well now for data transfer, they work well.

Post Reply