{"id":16632788,"url":"https://github.com/jerp86/postmessagewithwebview","last_synced_at":"2025-12-25T05:33:00.027Z","repository":{"id":38851647,"uuid":"407944473","full_name":"jerp86/postMessageWithWebView","owner":"jerp86","description":"Project is to demonstrate in a simple way how it is possible to have text and/or object communication between a Native/Hybrid app and a website, through window.postMessage().","archived":false,"fork":false,"pushed_at":"2022-12-02T00:47:45.000Z","size":1239,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-18T08:16:32.716Z","etag":null,"topics":["postmessage","postmessage-api","react-native","react-native-example","react-native-webview","react-native-webview-bridge"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jerp86.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}},"created_at":"2021-09-18T19:00:53.000Z","updated_at":"2022-03-14T13:23:44.000Z","dependencies_parsed_at":"2023-01-22T20:15:56.353Z","dependency_job_id":null,"html_url":"https://github.com/jerp86/postMessageWithWebView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerp86%2FpostMessageWithWebView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerp86%2FpostMessageWithWebView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerp86%2FpostMessageWithWebView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerp86%2FpostMessageWithWebView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerp86","download_url":"https://codeload.github.com/jerp86/postMessageWithWebView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243119690,"owners_count":20239319,"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":["postmessage","postmessage-api","react-native","react-native-example","react-native-webview","react-native-webview-bridge"],"created_at":"2024-10-12T05:10:23.090Z","updated_at":"2025-12-25T05:32:56.545Z","avatar_url":"https://github.com/jerp86.png","language":"JavaScript","readme":"\u003ch2 align=\"center\"\u003epostMessage with WebView\u003c/h2\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=React Native\u0026message=framework\u0026color=blue\u0026style=plastic\u0026logo=React\" /\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=JavaScript\u0026message=language\u0026color=blue\u0026style=plastic\u0026logo=JavaScript\" /\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/license-MIT-%23F8952D\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"#information_source-sobre\"\u003eSobre\u003c/a\u003e\u0026nbsp;|\u0026nbsp;\n  \u003ca href=\"#interrobang-motivo\"\u003eMotivo\u003c/a\u003e\u0026nbsp;|\u0026nbsp;\n  \u003ca href=\"#seedling-requisitos-mínimos\"\u003eRequisitos\u003c/a\u003e\n\u003c/h3\u003e\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"#rocket-tecnologias-utilizadas\"\u003eTecnologias\u003c/a\u003e\u0026nbsp;|\u0026nbsp;\n  \u003ca href=\"#package-como-baixar-o-projeto\"\u003eComo baixar o projeto\u003c/a\u003e\u0026nbsp;|\u0026nbsp;\n  \u003ca href=\"#memo-licença\"\u003eLicença\u003c/a\u003e\n\u003c/h3\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/54115624/133905963-0e1c3df2-9a82-4be0-864b-4560d716b4d7.png\" height=\"500\" alt=\"app's main screen, with two buttons\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/54115624/133905971-acd5a9af-f700-4799-b1d7-acc86864ba23.png\" height=\"500\" alt=\"alert message after clicking the 1st button\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/54115624/133905976-5ba1dd41-69ba-450c-83f0-108f00472a8f.png\" height=\"500\" alt=\"alert message after clicking the 2nd button\"\u003e\n\u003c/div\u003e\n\n## :information_source: Sobre\n\nProjeto trata de demostrar de forma simples como é possível haver comunicação de texto e/ou objetos entre um app Nativo/Híbrido e um site, através do window.postMessage().\n\n## :interrobang: Motivo\n\nEnquanto era produzido um WebApp que será chamado em uma WebView nativa (Android e iOS), foi detectado a necessidade de troca de informações entre o Nativo e WebApp.\n\n## :seedling: Requisitos Mínimos\n\n[NodeJS](https://nodejs.org/en/)\n\n## :rocket: Tecnologias Utilizadas\n\nO projeto foi desenvolvido utilizando as seguintes tecnologias\n\n- [Expo](https://expo.dev/)\n- [React Native](https://reactnative.dev/)\n- [React Native WebView](https://github.com/react-native-webview/react-native-webview#readme)\n- [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)\n\n## :package: Como baixar o projeto\n\nPara copiar o projeto, utilize os comandos:\n\n```bash\n  # Clonar o repositório\n  ❯ git clone https://github.com/jerp86/postMessageWithWebView.git\n\n  # Entrar no diretório\n  ❯ cd postMessageWithWebView\n```\n\nPara instalar as dependências e iniciar o projeto, você pode utilizar o Yarn ou NPM:\n\n**Utilizando yarn**\n\n```bash\n  # Instalar as dependências\n  ❯ yarn\n\n  # Iniciar o projeto\n  ❯ yarn start\n```\n\n**Utilizando npm**\n\n_PS: Caso utilize o NPM, apague o arquivo `yarn.lock` para ter todas as dependências instaladas da melhor forma._\n\n```bash\n  # Instalar as dependências\n  ❯ npm install\n\n  # Iniciar o projeto\n  ❯ npm start\n```\n\n## :memo: Licença\n\nEsse projeto está sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.\n\n---\n\n\u003ch4 align=\"center\"\u003e\n  Feito com ❤️ por Jerp86 👋️ \u003ca href=\"mailto:jerp4@hotmail.com\"\u003eEntre em contato!\u003c/a\u003e\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.linkedin.com/in/jerp/\"\u003e\n    \u003cimg alt=\"José Eduardo Rodrigues Pinto\" src=\"https://img.shields.io/badge/LinkedIn-jerp-0e76a8?style=flat\u0026logoColor=white\u0026logo=linkedin\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/jerpbtu\"\u003e\n    \u003cimg alt=\"José Eduardo Rodrigues Pinto\" src=\"https://img.shields.io/twitter/follow/jerpbtu?style=flat\u0026logoColor=white\u0026logo=Twitter\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerp86%2Fpostmessagewithwebview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerp86%2Fpostmessagewithwebview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerp86%2Fpostmessagewithwebview/lists"}