{"id":23763783,"url":"https://github.com/tomashubelbauer/ios-app-web-control","last_synced_at":"2026-04-27T18:03:48.758Z","repository":{"id":107986143,"uuid":"146024877","full_name":"TomasHubelbauer/ios-app-web-control","owner":"TomasHubelbauer","description":"A demonstration of using WebRTC to achieve communication between an iOS application and a web page","archived":false,"fork":false,"pushed_at":"2022-04-28T08:48:13.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T16:41:40.218Z","etag":null,"topics":["ios","ios-app","swift","webrtc","webview"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomasHubelbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2018-08-24T18:12:16.000Z","updated_at":"2022-04-16T13:34:42.000Z","dependencies_parsed_at":"2023-05-15T11:00:42.203Z","dependency_job_id":null,"html_url":"https://github.com/TomasHubelbauer/ios-app-web-control","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomasHubelbauer/ios-app-web-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fios-app-web-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fios-app-web-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fios-app-web-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fios-app-web-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/ios-app-web-control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fios-app-web-control/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261624959,"owners_count":23186118,"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":["ios","ios-app","swift","webrtc","webview"],"created_at":"2024-12-31T22:13:32.208Z","updated_at":"2026-04-27T18:03:43.713Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS App Web Control\n\nA demonstration of using WebRTC to achieve communication between an iOS application and a web page.\n\n## Configuring\n\n- Install [Carthage](https://github.com/Carthage/Carthage) for managing Swift dependencies\n- Install [TypeScript](https://www.typescriptlang.org/) for converting TypeScript to JavaScript\n\n### Dependencies\n\n- An [unofficial build of WebRTC by Anakros](https://github.com/Anakros/WebRTC)\n- TypeScript for converting TypeScript to JavaScript in the web application\n\n## Running\n\n- Mobile application: XCode\n- Web application:\n    - `cd src/web-control`\n    - `tsc -p . -w`\n\n## Debugging\n\n- Mobile application: XCode\n- Web application: Safari \u003e Develop \u003e My iPhone \u003e … (TypeScript source maps are provided)\n\n### Flow\n\n1. The user decides to use web control, clicks Web Control in the mobile app and the mobile app shows the web app URL to visit\n    - Currently for simplification, a web view is shown in the mobile app and direct communication is used between the apps\n    - In the future, the actual web app will be run in a browser on a laptop and the communication will go over the QR channel\n    - The mobile app, upon clicking Web Control, creates a peer connection and a data channel (without offer or answer)\n    - The mobile app starts listening for messages from the web app (for now direct communication, in the future a QR channel)\n2. The web application is opened and it initiates a peer connection and a data channel and waits for negotiation request\n3. The web app requires negotiation and creates an offer, then sets it as its local description and sends its SDP to the mobile app\n    - The web app also starts listening for messages from the mobile app immediately after startup (now direct, future QR channel)\n    - The web app will start generating candidates at this point and sending them to the mobile app as messages too\n4. The mobile app receives the offer SDP message and sets it as its remote description or candidate and adds it to its connection\n    - The mobile app creates an answer to the offer message and sets it as its local description, then sends its SDP to the web app\n    - The mobile app will start gathering ICE candidates at this point and sending them to the web app as messages\n5. The web app receives the answer SDP message and sets it as its remote description or candidate and adds it to its connection\n6. At some point the data channels open at both ends\n\nIn direct communication, trickle ICE is near instant, in QR communication, it will be down to the rotation of SDP and ICE codes.\n\nIn the future the web application may be changed to be able to act as a peer (offerer or answered)\nso that web applications can interconnect with any other and all have the ability to offer first.\n\nThe mobile application will always be an answered only, because the web application doesn't benefit\nfrom the mobile one being used as a remote control. (Or does it?)\n\n## To-Do\n\n### Implement the QR channel\n\nFirst, keep the web view but hide audit logs (so they are reachable using a button) and split the screen into two equal parts, one for mobile code and one for web code.\n\nSecond, actually pull the web site out and verify the QR channel still works.\n\n### Introduce and audio log view\n\nIn both the mobile app (replacing the alerts) and the web app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fios-app-web-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomashubelbauer%2Fios-app-web-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fios-app-web-control/lists"}