I am not getting the output of it?
Are you sure that the tool is generating output in this case? The code you posted is ignoring
stderr. If the tool is failing, and thus printing an error message to
stderrrather than its normal output to
stdout, you’d see exactly this behaviour.
And failure is definitely a possibility here. Remember that when a sandboxed process starts a child process, which is what
Processis doing here, the child process inherits the parent’s sandbox. I very much doubt that
VBoxManageis expecting to be run inside a sandbox.
One way to debug this is to skip all the code that sets up
standardError. The tool will then inherit
stderrfrom the app. If you run the app from Xcode, those are connected to Xcode’s Console pane. You’ll then be able to see exactly what the tool is printing.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Yes you are right. Doing that I am getting error below:
VBoxManage: error: Failed to create the VirtualBox object! VBoxManage: error: Code NS_ERROR_SOCKET_FAIL (0xC1F30200) - IPC daemon socket error (extended info not available) VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
I probably go without Sandbox. I sense it will be way too much effort to get around this looking at the (tiny) scope of the whole project. Just sad that it won't be able to go in the app store.
.. and greeting from Down Under (Sydney)!
Where is the VirtualBox server listening? It isn't that hard to get out of the sandbox. If the server is listening on TCP over localhost, all you need is network client entitlement. For locating the VBoxManage tool, you can just provide an interface for the user to select it. You can do the same if the server is listening on a UNIX socket.
It looks like VBoxManage can run over a network to remote Virtual Box servers over TCP port 3389. You should be able to make that work. For App Review, you will probably have to setup a private, remove Virtual Box server that they can test with, but that shouldn't be too difficult.
On second though, do some research on the Virtual Box protocol. You should be able to do what you need without VBoxManage. Here is a (Python) project that connects to Virtual Box remotely (github.com/ilyaglow/remote-virtualbox). Supposedly it is SOAP. SOAP won't win you any friends or developer street cred, but it is relatively straightforward. It's all XML. Now you can get your app into the iOS App Store.
Thanks John! Thats a great idea. Will look into it.