0

I would like to exchange messsages between Javascript and Pythonscript in iPhone Application,which does not involve any Web. I am using UIAutomation framework in the iPhone app.Is there any api to communicate from Javascript to Python?

Can I use the following ?

https://github.com/voodootikigod/node-serialport

In the following link it is specified it is for browser.

JavaScript/JQuery communicate with SerialPort/COM1

I have requirement where I need to invoke Javascript from Python.

In Android this is possible using adb commands.How to do the similar thing in iOS app using UIAutomation or someother framework which uses Javascipt.

I am able to execute pythonscripton Mac from iOS app (UIAutomation framework) using the following Code.

var target = UIATarget.localTarget();
var host = target.host();
var result = host.performTaskWithPathArgumentsTimeout("/usr/bin/python",["~/Sample.py"],10);

Is there any way to send some messages using pythonscript on Mac (host) to iOS app (which usesUIAutomation framework.

Community
  • 1
  • 1
Ram
  • 1,872
  • 5
  • 31
  • 54

1 Answers1

0

As far as I've seen you'll have to poll from your UIAutomation script. There isn't a built in interrupt service. I've been working on a way to do this and what I've come up with is writing all my scripts inside of a string and then using eval and an execution loop so that I can perform polling between every line of my UIAutomation script. There might be a better way to do it though! The software itself has a very narrow scope and so it's difficult to push the boundaries.

Braains
  • 606
  • 1
  • 5
  • 22