Load stack from server to mobile

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
danieg
Posts: 8
Joined: Thu Sep 19, 2019 7:53 am

Load stack from server to mobile

Post by danieg »

Hi all,

Is it possible to load a stack from server to an already existing mobile app? (go stack)
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Load stack from server to mobile

Post by Klaus »

Hi danieg,

welcome to the forum!

Yes, this is possible:

Code: Select all

...
go stack "https://url/to/your/stack.livecode"
...
This is however considered "loading external code" and strictly forbidden by Apple. :(
No idea about Android, sorry.


Best

Klaus
danieg
Posts: 8
Joined: Thu Sep 19, 2019 7:53 am

Re: Load stack from server to mobile

Post by danieg »

Thanks Klaus.

So loading external code possibly as a substack can yield added cards complete with objects like buttons, etc
without compiling in Android Studio first?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Load stack from server to mobile

Post by Klaus »

Yes, no compiling or whatever, just like you would open a stack in the IDE!
Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Load stack from server to mobile

Post by Pistris »

Hi Klaus

How would apple go about knowing am loading a stack from a server?

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

Re: Load stack from server to mobile

Post by Klaus »

No idea, but they will find out and then you are DOOMED! :D
Of course your app will be tested somehow.
jiml
Posts: 341
Joined: Sat Dec 09, 2006 1:27 am

Re: Load stack from server to mobile

Post by jiml »

I've heard rumors that some livecoders have not incurred Apple's rath with iOS apps that load external stacks.
The theory being it's akin to loading javascript in a webpage.

But I don't know if this is fact or mere rumor.

Can anyone confirm or refute?
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Load stack from server to mobile

Post by bogs »

Well, seems to me there is an easy way to test this for someone that has a developers account with apple ( I am not going to pay money to develop for someone's platform just to run a test!).

Just dev some app, or alternately, take one you already have published and are thinking about updating, and try it with that. You would find out pretty quickly at that point whether or not they'll let it fly, wouldn't you?
Image
Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Load stack from server to mobile

Post by Pistris »

I didn't know this was possible , this certainly opens a world of possibilities

does apple check your code when you submit to the App Store or just tests the app?
danieg
Posts: 8
Joined: Thu Sep 19, 2019 7:53 am

Re: Load stack from server to mobile

Post by danieg »

This from another site: (for iOS apps)

"Select the app you wish to download and after it finishes, go into Settings > General > Device Management and trust the developer certificate. And voila, the app should work and be ready to go."

Its called sideloading an app. If we can update an app by loading additional script, it will be almost like webapps, just better.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Load stack from server to mobile

Post by FourthWorld »

danieg wrote: Fri Sep 20, 2019 7:33 am If we can update an app by loading additional script, it will be almost like webapps, just better.
Exactly.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Load stack from server to mobile

Post by Klaus »

So this is allowed on iOS nowadays?
LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1235
Joined: Thu Apr 11, 2013 11:27 am

Re: Load stack from server to mobile

Post by LCMark »

@Klaus: It has taken years for Apple to get to a reasonable, understandable and sensible
rule in this regard. The relevant clause of the Apple Developer Agreement is:
3.3.2 Except as set forth in the next paragraph, an Application may not download or install
executable code. Interpreted code may be downloaded to an Application but only so long as
such code: (a) does not change the primary purpose of the Application by providing features or
functionality that are inconsistent with the intended and advertised purpose of the Application as
submitted to the App Store, (b) does not create a store or storefront for other code or
applications, and (c) does not bypass signing, sandbox, or other security features of the OS.

... next paragraph about the special-case of programming environment apps...
The agreement as a whole applies to all apps (macOS, iOS, WatchTV etc) which flow through Apple's
ecosystem [ It probably also, technically, applies to apps which you install ad-hoc on i-Devices too -
although what you choose to put on your own device in the privacy of your own home is not something
Apple can do something about ].

So downloading stackfiles containing data and LiveCode Script at runtime in support of an app's primary
purpose would appear to be fine - and will not cause you to be refused / ejected from the AppStore.

[ A general (even semi-general) LC player app does violate the clause due to (b) - it would essentially
be a 'storefront', whether you charged or not ].
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Load stack from server to mobile

Post by Klaus »

Aha, thank you very much for the explanation, Mark!

@danieg
So yes, it is allowed as long as you stick to Apples rules. :D
jiml
Posts: 341
Joined: Sat Dec 09, 2006 1:27 am

Re: Load stack from server to mobile

Post by jiml »

@LCMark , Thank you for posting the Apple reference. The rumors are true. Yipee! :D
Post Reply