1

I know that we can transfer any files to iOS by bundling data as app resources and let Xcode handle the deployment, which can be automated.

However, is it possible to transfer saved data back from iOS device to a desktop machine without human intervention?

I'm asking mainly for an automated test scenario. We build a test app which includes some input data in the app bundle, deploy and run some tests on the device, and finally save results and transfer the results back to a Mac. Also, the tests are all written in Lua, the app is just a runner.

Is my goal achievable at all?

finnw
  • 47,861
  • 24
  • 143
  • 221
kakyo
  • 10,460
  • 14
  • 76
  • 140
  • 1
    You can create a small web service on Mac and upload the data through HTTP. This will probably be the most straightforward. Of course, you can go with [Bonjour](http://stackoverflow.com/questions/2477602/bonjour-for-iphone). – maroux May 03 '13 at 02:54

1 Answers1

1

There may be something more specific for iOS, but here's a generic solution:

You can bundle LuaSocket with your test runner, and send the results to a small server running on your dev machine.

Server:

socket = require"socket"
server = socket.tcp()
server:bind("localhost", 9876)
server:listen()
while true do
    client = server:accept()
    write_to_disk(client:recieve"*a")
end

Client:

data = serialize(test_results)
socket = require"socket"
client = socket.tcp()
client:connect("devMachine",9876)
client:send(data)
client:close()
Ray Osgod
  • 56
  • 3