{"action":"created","issue":{"url":"https://api.github.com/repos/openstf/stf/issues/64","repository_url":"https://api.github.com/repos/openstf/stf","labels_url":"https://api.github.com/repos/openstf/stf/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/openstf/stf/issues/64/comments","events_url":"https://api.github.com/repos/openstf/stf/issues/64/events","html_url":"https://github.com/openstf/stf/issues/64","id":103341700,"number":64,"title":"iOS support","user":{"login":"kwv","id":308842,"avatar_url":"https://avatars.githubusercontent.com/u/308842?v=3","gravatar_id":"","url":"https://api.github.com/users/kwv","html_url":"https://github.com/kwv","followers_url":"https://api.github.com/users/kwv/followers","following_url":"https://api.github.com/users/kwv/following{/other_user}","gists_url":"https://api.github.com/users/kwv/gists{/gist_id}","starred_url":"https://api.github.com/users/kwv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwv/subscriptions","organizations_url":"https://api.github.com/users/kwv/orgs","repos_url":"https://api.github.com/users/kwv/repos","events_url":"https://api.github.com/users/kwv/events{/privacy}","received_events_url":"https://api.github.com/users/kwv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":55,"created_at":"2015-08-26T18:58:57Z","updated_at":"2016-11-19T17:00:22Z","closed_at":null,"body":"Awesome, inspiring stuff.  \n# TLDR; is iOS support on your roadmap?\n\nI've been tinkering around with a solution that works on iOS devices (or simulators).  The approach streams snapshots over websockets to a canvas and forwards user-generated mouse/keyboard events to Appium which replays them against a device.  For a stand alone solution, with a single device, it works. \n\nnext up on the roadmap:   \n- improve performance of image capture\n- support multicasting of a device\n- support streaming multiple concurrent devices (i.e. one per browser tab)\n- polish the code (env variables and such)\n- approval w/ stakeholders to release as open source\n\n---\n\nI understand its hard to comment on a solution you haven't seen.  Before I get too much further down this proof-of-concept, I wanted to solicit feedback **Are there any plans to support iOS in STF?**   Have you already been down this path and abandoned it?  \n### proof of concept approach\n#### image capture\n\nTo capture images, I've evaluated: \n-  using `libimobiledevice` which uses devloper disk image to capture on the device to achieve 5-10 fps.  Unfortunatly these are large files (3MB TIFFs), that are begging to be pre-processed into a PNG.\n-  using QuickTime's screen mirroring; and screenshoting that (on the host) which allows ~25 fps, but won't scale beyond the first device.\n-  forking [xrecord](https://github.com/WPO-Foundation/xrecord) to implement a QT mirroing solution that output jpegs (and would allow multiple devices) \n#### devices\n\nTesting against a physical device is desirable however without jailbreaking the device there are some limitations (lockscreen, home button).\n\nThe iOS simulator was able to produce highest framerates, and the closest experience to what STF provides for Android, but there is a nagging feeling it's not going to scale or meet the requirements (e.g. managed in MDM, recgnoize an internal cert chain)\n#### Shortcomings\n-  Appium is limited to the underlying device automation implementation.  On iOS  it is [UIATarget](https://developer.apple.com/library/ios/documentation/ToolsLanguages/Reference/UIATargetClassReference/)\n  -  UIATarget has an api to send the application to the background for a duration. Appium wants to launch an application on startup.  On a physical device this means there's no interacting with Home Screen, system properties without jailbreaking the device and getting creative.  For simulators, there may be a way to mimic, but would need to figure out how to support concurrent simulators.\n  - perceptable lag (~1-2 seconds) on keyboard events propagating back to the device. A short (100ms) buffer for keyboard events may help, but special keys like Delete make it interesting\n-  Duplication of inventory in Selenium Grid and STF.   We've got a node module that watches USB for new device connections, starts an Appium server and registeres it with a Selenium grid, but we need to federate that back into STF for discovery \n"},"comment":{"url":"https://api.github.com/repos/openstf/stf/issues/comments/261725392","html_url":"https://github.com/openstf/stf/issues/64#issuecomment-261725392","issue_url":"https://api.github.com/repos/openstf/stf/issues/64","id":261725392,"user":{"login":"sorccu","id":32509,"avatar_url":"https://avatars.githubusercontent.com/u/32509?v=3","gravatar_id":"","url":"https://api.github.com/users/sorccu","html_url":"https://github.com/sorccu","followers_url":"https://api.github.com/users/sorccu/followers","following_url":"https://api.github.com/users/sorccu/following{/other_user}","gists_url":"https://api.github.com/users/sorccu/gists{/gist_id}","starred_url":"https://api.github.com/users/sorccu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorccu/subscriptions","organizations_url":"https://api.github.com/users/sorccu/orgs","repos_url":"https://api.github.com/users/sorccu/repos","events_url":"https://api.github.com/users/sorccu/events{/privacy}","received_events_url":"https://api.github.com/users/sorccu/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T17:00:21Z","updated_at":"2016-11-19T17:00:21Z","body":"No, it's super, super slow. And unreliable. Can take 5-15s for an event to\nregister.\n\nOn Sun, 20 Nov 2016 at 1:58 Ashraf Ali <notifications@github.com> wrote:\n\n> Could we not use appium/WebDriverAgent to send the touch events commands\n> to the device since it was designed to run automation tests\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/openstf/stf/issues/64#issuecomment-261725275>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAB-_cUX0EvPxfYueY8qY9IySPOqVx8sks5q_yqhgaJpZM4FyyUk>\n> .\n>\n"}}
{"actor":{"display_login":"sorccu"}}