add levureTestApplicationOnMobile
macMikey opened this issue · 2 comments
Instead of targeting the simulator, target a mobile that is attached.
The simulator can't do some things like operate the camera, AFAIK.
@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.
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
- I could probably make this feature happen, with some help on the Levure build process, so I don't have to dive in on the code to learn it.
- There is a lot of flexibility that could be achieved, including overriding current IDE selections, testing before building, etc. Example: levureTestApplicationOnMobile target - although I don't know if there is a reason why the existing levure test functionality could not just be extended to support this idea.