{"id":13530990,"url":"https://github.com/AirtestProject/iOS-Tagent","last_synced_at":"2025-04-01T19:30:58.466Z","repository":{"id":41156394,"uuid":"131815259","full_name":"AirtestProject/iOS-Tagent","owner":"AirtestProject","description":"iOS support agent for automation","archived":false,"fork":false,"pushed_at":"2024-06-24T09:11:30.000Z","size":47853,"stargazers_count":686,"open_issues_count":142,"forks_count":182,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-01T16:17:12.694Z","etag":null,"topics":["automated-testing","automation","ios","ios-app","ios-ui"],"latest_commit_sha":null,"homepage":"http://airtest.netease.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AirtestProject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T07:37:04.000Z","updated_at":"2025-03-28T17:07:23.000Z","dependencies_parsed_at":"2024-11-02T17:42:45.106Z","dependency_job_id":null,"html_url":"https://github.com/AirtestProject/iOS-Tagent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FiOS-Tagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FiOS-Tagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FiOS-Tagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FiOS-Tagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AirtestProject","download_url":"https://codeload.github.com/AirtestProject/iOS-Tagent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700189,"owners_count":20819833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-testing","automation","ios","ios-app","ios-ui"],"created_at":"2024-08-01T07:00:58.800Z","updated_at":"2025-04-01T19:30:58.446Z","avatar_url":"https://github.com/AirtestProject.png","language":"Objective-C","funding_links":[],"categories":["Dynamic Analysis"],"sub_categories":[],"readme":"iOS-Tagent Introduction\n=======================\n\niOS-Tagent is a project based on facebook [WebDriverAgent](https://github.com/facebook/WebDriverAgent) and intend to fit [Airtest Project](http://airtest.netease.com/).\n\n\nWe make some customized optimization and adjustments to it and it works well in:\n\n| iOS       \t| Xcode \t|\n|-----------\t|-------\t|\n| 10.x-12.x \t| 10.x  \t|\n| ≥ 9.3       \t| ≥ 9.3   \t|\n\nOther versions of Xcode and iOS are not fully tested and may cause unexpected errors.\n\n\nIf you need README in Chinese, click here([如需中文文档，请点击这里](./Introduction/README_zh.md))\n\n\n# Getting Started\n\nTo perform Airtest in iOS, the following steps are required\n\n## 1. iOS-Tagent\nCreate a WebDriver server on your iPhone which makes it possible to remote control iOS devices and locate UI elements.\n\n* 1.1 Clone or Download iOS-Tagent\n\n    \u003e git clone git@github.com:AirtestProject/iOS-Tagent.git\n\n* 1.2 Open iOS-Tagent with Xcode and connect your iPhone to Mac with a data cable\n\n    \u003e Select `product` -\u003e `Scheme` -\u003e `WebDriverAgentRunner` in the top menu of Xcode\n\n    \u003e Then select `product` -\u003e `Destination` -\u003e your iPhone\n\n    ![chooseScheme](/Introduction/chooseScheme.png \"chooseScheme\")\n\n* 1.3 Start tests by click `product` -\u003e `Test`. When something like this shows in the log, it means that iOS-Tagent have started successfully.\n\n```\n    Test Suite 'All tests' started at 2017-01-23 15:49:12.585\n    Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-23 15:49:12.586\n    Test Suite 'UITestingUITests' started at 2017-01-23 15:49:12.587\n    Test Case '-[UITestingUITests testRunner]' started.\n    t =     0.00s     Start Test at 2017-01-23 15:49:12.588\n    t =     0.00s     Set Up\n```\n\nMore about how to start WebDriverAgent [here](https://github.com/facebook/WebDriverAgent/wiki/Starting-WebDriverAgent) and [here](https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest-real-devices.md)\n\n## 2. Set up proxy\n\niproxy maps the iPhone port to the Mac port, so you can access the phone by accessing the Mac. \n\nYou need to set up the usb proxy to access the Agent on the actual phone, as there may be problems when accessing directly through wifi. For more information, check  [Issues](https://github.com/facebook/WebDriverAgent/wiki/Common-Issues) and [detail](https://github.com/facebook/WebDriverAgent/issues/288)\n\nThe original source code of iproxy is shown in https://github.com/libimobiledevice/libimobiledevice\n\n* 2.1 Install iproxy with Homebrew\n\n    `$ brew install libimobiledevice`\n\n* 2.2 Run iproxy\n\n    `$ iproxy 8100 8100`\n\nThen try to access http://127.0.0.1:8100/status in your mac browser. If a json data about your iPhone is returned, it means iproxy started successfully. Moreover, you can see iPhone screen projected on the browser by visiting http://127.0.0.1:8100/inspector .\n\n**Note** that iproxy can only listen to localhost. If you want to connect iPhone on AirtestIDE on a windows OS, you can try [wdaproxy](https://github.com/openatx/wdaproxy). The specific steps are as follows:\n\n* Connect iPhone to Mac with a usb cable.\n* Run wdaproxy in Mac. wdaproxy can map the iPhone port to the Mac port too. You can see the installation instruction in https://github.com/openatx/wdaproxy .\n* Fill ip address and port of the iPhone (retrieved in the previous step) in the input box of AirtestIDE on Windows and click button \"connect\".\n\n## 3. AirtestIDE\n\nConnect to the iPhone by ip address, refresh screen, run tests\n\nAfter the above two steps, you can fill \"http://127.0.0.1:8100\" in the iOS address input box of AirtestIDE. Click button \"connect\" to connect your iPhone and start your Airtest test.\n\n\u003cimg src=\"./Introduction/connectDevice.jpg\" alt=\"connectDevice\" title=\"connectDevice\" width=\"50%\" height=\"50%\"\u003e\n\n![image](./Introduction/ios-inspector.gif)\n\nNote that you can also view the device Hierarchy\n\nThis feature work with [Poco](https://github.com/AirtestProject/Poco) and AirtestIDE.\n\n# Q \u0026 A\n\nWe have collected a series of common issues on our [Q\u0026A](./Introduction/question.md). If you have any questions, please take a look at these first. \nIf you can't find your issue here, or you have any suggestion, please feel free to post it in [Issues](https://github.com/AirtestProject/iOS-Tagent/issues).\n\n\n1. [Xcode version](./Introduction/question.md#xcode-version)\n1. [iOS Developer Account](./Introduction/question.md#ios-developer-account)\n1. [Login to Xcode](./Introduction/question.md#login-to-xcode)\n1. [Manage developer certificate](./Introduction/question.md#manage-developer-certificate)\n1. [Xcode failed to create provisioning profile](./Introduction/question.md#bundle-identifier)\n1. [Trust certificate](./Introduction/question.md#trusting-certificates)\n\n\n\n# API status\n\nThis project intend to work with\n[AirtestIDE](http://airtest.netease.com/) and [AirtestFramework](https://github.com/AirtestProject/Airtest)\n\nCommon API in Airtest is supported\n\n\u003e -   start\\_app: OK\n\u003e -   stop\\_app: OK\n\u003e -   snapshot: OK\n\u003e -   home: OK\n\u003e -   touch: OK\n\u003e -   swipe: OK\n\u003e -   text: OK\n\u003e -   wait: OK\n\u003e -   exists: OK\n\u003e -   find\\_all: OK\n\u003e -   assert\\_exists: OK\n\u003e -   assert\\_not\\_exists: OK\n\nexcept:\n\n\u003e -   wake: Not supported now (may use 'home' instead)\n\u003e -   keyevent: Only support 'home' event\n\u003e -   clear\\_app: Not supported now\n\u003e -   install: Not supported now\n\u003e -   uninstall: Not supported now\n\n\n# License\n\nThis project is based on [WebDriverAgent](https://github.com/facebook/WebDriverAgent) :\n\n[**WebDriverAgent** is BSD-licensed](./LICENSE) . We also provide an additional [patent grant](./PATENTS).\n\nHave fun with Airtest!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAirtestProject%2FiOS-Tagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAirtestProject%2FiOS-Tagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAirtestProject%2FiOS-Tagent/lists"}