Target application is not frontmost?

Hi all,

When i work on my mobile scripts, one of our application option is to connect to tweet, when i click the this option, it will pop up Sign in to iTunes Store dialog box, then i went to work on different things, when I come back and click the my iPhone device, i got following error message: “Could not start script, target application is not frontmost.”

I tried to disconnect iPhone from my VMware machine and reconnect, then restart iOS Gateway, it still shows me same error message, what can I do to get my application to frontmost?

By the way, my iPhone connect to VMWare which located in my office, but I work in the different location using VPN to connect to VMWare, I can’t physically touch my iPhone device.



As long as I let my co-worker physically touch my iphone and disconnect/connect with my VMware machine, then I restart my Xcode and iOSGateway, then I can start working on my scripts again. Otherwise I will get “target application is not frontmost.” By the way, I set my iPhone screen lock for never.

So, is any method let my target application is frontmost without physically disconnect/connect my iPhone?