IOS Being the FTP Server ?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

IOS Being the FTP Server ?

Post by Nakia » Mon Jun 04, 2012 1:11 pm

Evening all,

I have another project coming up that is going to require me to set up an IOS device as an FTP Server.
The questions I have are:

1: Can LC and IOS do this? cant find any information on this?
2: If 1 = true then I need to be able to control the IP Address of the IOS device when its a WiFi Hotspot as the FTP Clients can only communicate to a fixed IP Address.

For example:
the device is running as a WiFi Hotspot.
App starts, starts FTP Server (with a fixed definable IP Address)
clients connect once communicable and pass data.

will this be achievable?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: IOS Being the FTP Server ?

Post by sturgis » Mon Jun 04, 2012 1:55 pm

Socket support is not yet available for livecode on IOS. I think its planned for a future update.

As for controlling your IP, I don't believe you have direct control. However its possible that once the IP is assigned (and you don't move locations/cell towers) it won't change often. Assuming a 'real' ip (rather than a private) is assigned to the device, then you might be able to use a dynamic dns service to handle pointing to your device. If the IP changes, update the dns entry. This way all clients can point to a name and get pointed to the current IP.

If all of the requirements are met, and dynamic dns is set up the you can probably use this: http://itunes.apple.com/us/app/ftp-driv ... 71784?mt=8 as your ftp server. I haven't tried it but for 99 cents its a cheap test to see if it can be done.

If the IOS device is assigned a private address, and is assigning private addresses to its clients as it acts as a hotspot, i'd check the app you use to see if it does internal name services. If it does, same type of deal. Don't use the IP address use the assigned device name and hit that. (or if you are writing the clients in LC it should be possible to determine the IP of the gateway (which should be the IOS device acting as hotspot) and use that IP.)

Unfortunately I don't have a cell based IOS device so I can't actually try any of this.

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: IOS Being the FTP Server ?

Post by gpb01 » Mon Jun 04, 2012 3:10 pm

Nakia wrote:Evening all,

I have another project coming up that is going to require me to set up an IOS device as an FTP Server.
The questions I have are:
..........
Hi Nakia,
I had the same need and ... I had to change my mind ... :(

FTP server, at moment, is NOT available also on the desktop versions of LC ... I can't imagine when will be available on iOS :(

I solved my problem using DropBox (DorpBox released sdk both for iOS and OSX, but, in LiveCode, it's very easy to connect also using the "put URL ...." and the REST API), so ...
... if DropBox can be an alternative for you ... think to this solution ;)

Guglielmo

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: IOS Being the FTP Server ?

Post by sturgis » Mon Jun 04, 2012 3:40 pm

The desktop version of livecode does have socket support so it should be possible to create an ftp server with it (I think). Still not for IOS though.
I think the dropbox method would be a great way to go, theres also google drive (Is there an IOS client for google drive yet?).. There are quite a few options out there.

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: IOS Being the FTP Server ?

Post by gpb01 » Mon Jun 04, 2012 5:11 pm

sturgis wrote:The desktop version of livecode does have socket support so it should be possible to create an ftp server with it (I think). Still not for IOS though.
Hi sturgis,
writing an FTP for the desktop version was also my first idea but ...
... have you already tried to write a complete FTP ? Uff ... good luck ... :D
sturgis wrote:I think the dropbox method would be a great way to go, theres also google drive (Is there an IOS client for google drive yet?).. There are quite a few options out there.
No, unfortunately Google has not yet released and iOS client ...
... but, do you know if they have, like DropBox, some kind of REST API ???

Guglielmo

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: IOS Being the FTP Server ?

Post by sturgis » Mon Jun 04, 2012 7:05 pm

Yeah, think i'll pass on writing an ftp server. In any language!

Not sure what the google drive api details are but you can read up on it here. https://developers.google.com/drive/v1/reference/

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: IOS Being the FTP Server ?

Post by gpb01 » Mon Jun 04, 2012 7:33 pm

sturgis wrote: ...
Not sure what the google drive api details are but you can read up on it here. https://developers.google.com/drive/v1/reference/
Mmm ... interesting ... :)

Yes, it seems that the logic is the same as DropBox, both use OAuth for authorization and, probably, with sample "put URL ..." is possible to use also Google Drive ...
... I will try with my account ... ;)

Guglielmo

Updated : Google Drive use Oauth 2, DropBox use OAuth 1. More ... "Authorization alone is not sufficient to give your app access to users' files — app installation is also required. Apps will not have any API access to files unless users have first installed the app in Chrome Web Store" ... but they still don't have App for iOS :(

Much easier to use continue to use DropBox ;)

Post Reply