I've been trying to setup ios-driver to work on a real device for testing on mobile safari etc...
1. Plugin a ios iphone with web inspector turned on.
2. Run IOS-server
3. Execute the following code.
Now this doesn't work and in the log on the server i get the following.
Kitty:target tester$ java -jar ios-server-standalone-0.6.6-SNAPSHOT-20140612-1724.jar -beta > iosserver.log
52:28:743 INFO ApplicationStore.<init> App archive folder:/Users/tester/Projects/ios-driver/server/target/applications
52:29:168 INFO DeviceStore.onDeviceAdded new device detected (d835ed39ee5a71f551464f86641859df360b1f79) iPhone 5C GTS
52:29:886 INFO DeviceStore.onDeviceAdded device iPhone 5C GTS = safari 9537.53
52:30:133 INFO DeviceStore.onDeviceAdded new device detected (449fd653c6e0dcc5fc4c0f63d2526e3d8c3211b1) Iphone 5
52:30:567 INFO DeviceStore.onDeviceAdded device Iphone 5 = safari 9537.53
52:30:885 INFO IOSServer.initDriver
Beta features enabled (enabled by -beta flag): true
Simulator enabled : true
Monitoring '/Users/tester/Projects/ios-driver/server/target/applications' for new applications
Archived apps: /Users/tester/Projects/ios-driver/server/target/applications
Build info: ios-driver 0.6.6-SNAPSHOT (built:20140612-1724,sha:dcba05ab55f3debbc7fb7246c9eeb86f53b83f7b)
Running on: Mac OS X 10.9.2 (x86_64)
Using java: 1.7.0_51
Using Xcode install: /Applications/Xcode.app
Using instruments: version:5.1, build: 55044
Using iOS version 7.1
iOS >= 6.0. Safari and hybrid apps are supported.
Applications :
---------------
com.apple.mobilesafari::9537.53
CFBundleName=Safari,CFBundleVersion=8536.25,/Users/tester/.ios-driver/safariCopies/safari-6.1.app com.apple.mobilesafari::9537.53
CFBundleName=Safari,CFBundleVersion=9537.53,/Users/tester/.ios-driver/safariCopies/safari-7.1.app
2014-06-13 11:52:30.950:INFO::jetty-7.x.y-SNAPSHOT
52:38:359 INFO APPIOSApplication.canRun The application doesn't have any content files. Localization related features won't be available.
52:38:360 INFO APPIOSApplication.canRun The application doesn't have any content files. Localization related features won't be available.
52:39:882 WARNING WebKitNotificationListener.onMessage ReportConnectedApplicationsMessage reported 0 app.
52:44:835 WARNING RemoteIOSWebDriver.start session created but application size=0
java.lang.NullPointerException
at org.uiautomation.ios.drivers.RemoteIOSWebDriver.get(RemoteIOSWebDriver.java:211)
at org.uiautomation.ios.drivers.IOSDualDriver.start(IOSDualDriver.java:149)
at org.uiautomation.ios.ServerSideSession.start(ServerSideSession.java:242)
at org.uiautomation.ios.command.uiautomation.NewSessionNHandler.safeStart(NewSessionNHandler.java:85)
at org.uiautomation.ios.command.uiautomation.NewSessionNHandler.handle(NewSessionNHandler.java:52)
at org.uiautomation.ios.command.BaseCommandHandler.handleAndRunDecorators(BaseCommandHandler.java:103)
at org.uiautomation.ios.servlet.IOSServlet.getResponse(IOSServlet.java:151)
at org.uiautomation.ios.servlet.IOSServlet.process(IOSServlet.java:82)
at org.uiautomation.ios.servlet.IOSServlet.doPost(IOSServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1066)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:744)
However if I do the same steps but with the safari browser open on the device it works fine. Is there a way in code to get it to launch safari? Ideally if would be good to have the safari launched by the ios-driver. Is there a missing step that i am missing?
Your help would be most appreciated.