trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

add levureTestApplicationOnMobile #168

Open macMikey opened 3 years ago

macMikey commented 3 years ago

Instead of targeting the simulator, target a mobile that is attached. The simulator can't do some things like operate the camera, AFAIK.

trevordevore commented 3 years ago

@macMikey That would be a nice addition. I suggest researching what would be involved in doing that and adding as much information to this request as possible.

macMikey commented 3 years ago

IDE API research complete.

IDE API

This was straightforward. There are five relevant functions. All of them are wrappers found in in revIDELibrary.8 The first three are used in private function revMenubarSimulatorSubmenu, which is the function that builds the Test Target submenu. revIDETestTargets() returns an array with a key for each platform and entries for each device or simulator for each platform. revIDETestTarget() returns the currently chosen test target, presumably from whatever LC setting holds that value. revIDETestCanDeployToTarget (pTarget) returns the list of test targets for platform pTarget that can be deployed to.

When the developer chooses a target, (command) revIDESetTestTarget pTarget is called, which I presume stores the preference for future use. The actual test (build, install, and if in the simulator, firing up the test) is accomplished one of two ways in revMenubar, which are equivalent, because one is just a wrapper for the other: revIDEActionTest or revIDEDeployAction. The fact that both are used in revMenubar looks like a whoopsie. Neither command takes any parameters, and neither one seems to be referenced anywhere but in revMenubar

Thoughts