Coding an Update Functionality for an LC App ?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Sun Jan 21, 2018 2:19 am

Waaaaaaaaaahhhh, Really cool. the open function was missing indeed. !
Thanks guys, this is working great on w10 so far and would be a releive for any update process in someway.
:mrgreen: :mrgreen:

So, what are the Pros/cons for the security side of the Data Transfered between devices and server ?
Is encryption enuf to protect your data privacy ..or is VPN required too ..?
:roll:
Thanks.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2199
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Coding an Update Functionality for an LC App ?

Post by jmburnod » Sun Jan 21, 2018 10:04 am

Hi,
I said:
As far i know that is not possible for iOS app. Apple doesn't allow import code and consider stacks as code
I forgot that is possible to import stacks with an enterprise Apple account. In the past we used this way to deploy EcrireEnPictos for all people. We gave up this way because Apple allows this feature for member of enterprise only.
Jean-Marc

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Sun Jan 21, 2018 10:15 pm

thanks for specifying this about Apple accounts..

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Mon Jan 22, 2018 2:46 am

Dumb question : Using a launcher this way only works if you are Online ?

That is, If a network interruption occurs you CANT keep up working offline, plus you d loose al the data in memory as soon as you close your App, isnt it ?

so thats only worth for strongly connected users... :shock:

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 251
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Mon Jan 22, 2018 3:21 am

If a network interruption occurs you CANT keep up working offline..
The stack is stored in memory while working, so it would continue working if the network was lost, unless you were accessing a remote database, in which case it would not work, but neither would an application that launched locally since it would also require a network connection.
.. plus you d loose al the data in memory as soon as you close your App
Does your app store data? If so, where does it store that data?

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 251
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Mon Jan 22, 2018 3:55 am

So, what are the Pros/cons for the security side of the Data Transfered between devices and server ?
Is encryption enuf to protect your data privacy ..or is VPN required too ..?
Is there data other than the stack being transferred between devices and server? I mean are you accessing a database or something else on the server?

If not, then once the stack is downloaded onto the device, there is not a streaming connection, per se. The stack is downloaded and then runs from the memory of the device.


Your main concern would probably be securing the stack on your server so it is not available to just anyone with the url. Instead, they would need the launcher to access it. There are different ways of securing that.

I was using a VPN, since the people using the application were within a small office (it was not a publicly distributed app).

If you have php or (better yet) Livecode Server running on the server, you can write a script that the launcher sends a message to and if the request is valid you deliver the stack that is in a separate folder (not available from the webserver).

The LC Server Script might be something like:

Code: Select all

<?lc

        --if this is a request for the stack, give it and exit
        if  $_GET[""] is "stackme" then
                          put url ("binfile:/var/www/stacks/yourstack.livecode") into tStackData
                        -- Always check for errors with file I/O:
                        if the result is not empty then
                          put "Error: "& the result &"("& sysError() &")" & the address
                          quit
                        end if
                        -- Deliver the goods:
                        put tStackData
        quit


      	else --if this is just an empty html call
	
	 put "<h1>This is not the website you were looking for..</h1>"

        end if
      
?>

and your launcher script might look like this:

Code: Select all

on openStack
   //request the stack
   go url "https://yourserver.com/index.lc?=stackme"    
   //close this window 
   close stack launcher
end openStack


Of course, these are basic examples and there are more elaborate ways you could set that up, but you get the idea.

teriibi
Posts: 252
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Mon Jan 22, 2018 1:44 pm

Thanks cottage,

As for the launching, I was thinking that it HAS to have some filter.
Yes it would require some mechanism to avoid unwanted access just in the case the launcher get copied or made public without one wanting so.

Actualy, this launching mechanism is pretty interesting since one could use it to deliver/build a single launching script pointing to different type of users to dif types of DBs and even APPS based on some "lauching input criteria" 8) 8) !!!

Yes, the downloading of stack is just the 1rst step to access a DB.
It would offer accessing to database with distinct users account
Also Involve (Sqlite) LOCAL and ONLINE DBs data transfer between DB and users or users/users through the Server.

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 251
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Mon Jan 22, 2018 9:14 pm

Actualy, this launching mechanism is pretty interesting since one could use it to deliver/build a single launching script pointing to different type of users to dif types of DBs and even APPS based on some "lauching input criteria"
Yes, on my last project I was using the index page as a sort of traffic controller to send various requests to different locations/scripts (including database connections and queries). The first couple of variables in the url would just be something like ?type=db , and then the rest would be encrypted/encoded.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”