{"id":19544816,"url":"https://github.com/drewalth/ios-webview-communication","last_synced_at":"2026-05-04T17:36:22.932Z","repository":{"id":202147366,"uuid":"704243161","full_name":"drewalth/ios-webview-communication","owner":"drewalth","description":"Two-way communication between a Reactjs app and SwiftUI via WebView","archived":false,"fork":false,"pushed_at":"2023-10-19T23:23:14.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T05:42:21.292Z","etag":null,"topics":["ios","react","reactjs","swift","swiftui","two-way-communication","webview"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drewalth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-12T21:03:49.000Z","updated_at":"2023-10-19T23:17:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5d7eabe-aef8-4ad0-8d2a-ec7b79b9e30b","html_url":"https://github.com/drewalth/ios-webview-communication","commit_stats":null,"previous_names":["drewalth/ios-webview-communication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drewalth/ios-webview-communication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewalth%2Fios-webview-communication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewalth%2Fios-webview-communication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewalth%2Fios-webview-communication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewalth%2Fios-webview-communication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drewalth","download_url":"https://codeload.github.com/drewalth/ios-webview-communication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewalth%2Fios-webview-communication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32618206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","react","reactjs","swift","swiftui","two-way-communication","webview"],"created_at":"2024-11-11T03:32:07.561Z","updated_at":"2026-05-04T17:36:22.916Z","avatar_url":"https://github.com/drewalth.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ios-webview-communication\n\nPrototype demonstrating two-way communication between a webview (Reactjs app) and SwiftUI. i.e., execute native code from the webview JavaScript and execute webview JavaScript code from native.\n\n# Use Case\n\nYou've are building a product that requires some sort of hardware functionality, like bluetooth, camera, or NFC but you are on a tight budget and can't afford to build and maintain a 100% native app. So, you build the common UI with Reactjs and use native code to handle the hardware functionality.\n\n# Requirements\n\n- Xcode 15\n- Nodejs LTS\n\n# How to run\n\n1. Clone the repo\n2. `cd` to my-react-app, run `npm install`\n3. run `npm run build`\n4. run `npm run preview -- --host`\n5. open ReactCommunication.xcodeproj in Xcode\n6. Change the signing team to your team\n7. Change the value of `reactAppURLString` in `ContentView.swift` to the URL from step 4\n8. Run the app\n9. tap some buttons to see the communication in action","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewalth%2Fios-webview-communication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewalth%2Fios-webview-communication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewalth%2Fios-webview-communication/lists"}