Remote stack (via internet) on Android?
Posted: Mon Mar 31, 2014 5:04 pm
Can I load an external stack from a server to an Android or iOS standalone?
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
Code: Select all
on mouseUp
go stack URL "http://www.mysite.com/myStack.livecode"
end mouseUp
But what if Apple didn't know this is how it worked? Is there a way I can run a command from a variable such asKlaus wrote:Hi guys,
I am afraid that this will be seen as "loading external code"***, which is strictly prohibited on iOS!![]()
*** Even if the remote stack does not contain any scripts!
Best
Klaus
Code: Select all
put "go stack url" into tCommand
execute code from tCommand
Come on!EssoAir wrote:But what if Apple didn't know this is how it worked?
Klaus wrote:Come on!EssoAir wrote:But what if Apple didn't know this is how it worked?
I don't believe Apple still has any prohibition against user-generated code executing locally. Indeed, I believe there's at least one BASIC app available in their app store.EssoAir wrote:Klaus wrote:Come on!EssoAir wrote:But what if Apple didn't know this is how it worked?
Ok ok i know its a long shot, but can you load a command as a string in to a variable and excecute it? Can this be done on desktop?
Like, for example, can I have a user enter a command into a text field and have that command be run by the stack?
I get that and understand it, but do you know the answer to the question? Can a command be executed from a string variable such that on a desktop standalone one could make a strange web-console type thing where the user enters LiveCode commands that are executed by the stack?FourthWorld wrote:If a stack file is merely a media container and includes no code at all, it may be viewed as compliant with Apple's terms.
However, even then it's possible with just property settings to alter the execution path of an app, and in such cases it may be seen as a violation.
If one were sufficiently motivated to test Apple's boundaries I suppose an experimental app could be made to see what we can get away with. But personally, I wouldn't risk having my company permanently banned from the Apple store; trying to trick one of the world's most powerful multinationals seems unlikely to turn out favorably, esp. in an area that they regard as related to end-user security.
It may be simpler to just do as Apple's license terms appear to suggest: if you want to freely share executable code modules over HTTP, ignore iOS and deploy exclusively for Android.
Yes, you could use the "DO" command for example, Mr. ThrillseekerEssoAir wrote:Can a command be run from a string variable?
Wow i feel stupid! I saw "do" in the revdocs and assumed it was a do-while loop like in most programming languages.Klaus wrote:Hi Esso,
Yes, you could use the "DO" command for example, Mr. ThrillseekerEssoAir wrote:Can a command be run from a string variable?![]()
Best
Klaus
Code: Select all
//Within the card
on openCard
if the environment <> "mobile" then exit openCard
mobileControlCreate "input", "urlBar"
mobileControlSet "urlBar", "visible", true
put the rect of control "urlBarRect" into iRect //urlBarRect is just a rectangle
mobileControlSet "urlBar", "rect", iRect //placed where i want the input
end openCard //field to go
//Inside the button
on mouseUp
mobileControlDelete "urlBar"
put mobileControlGet "urlBar", "text" into urlText
if urlText contains ".livecode" then //it assumes that you wrote the entire command into the line so that it
do urlText //would only actually run if you wrote the folloing:
else // go stack url "http://yourserver.com/path/to/file/Example.livecode"
mobileControlCreate "browser", "urlBrowser"
put the rect of control "urlBrowserRect" into tRect
mobileControlSet "rect", "urlBrowser", tRect
mobileControlSet "urlBrowser", "visible", "true"
mobileControlSet "urlBrowser", "url", urlText
end if
end mouseUp