[Swift] Two-way communication between iOS Webview and React

J.Kim
Mar 6, 2022

--

Scenario:

  • React application will be rendered using Webview on iOS
  • Clicking the ‘Click me’ button will send data to iOS and native alert will pop up (Javascript to iOS)
  • Closing the native pop up will send a newly generated UUID from iOS to React application and it will be rendered (iOS to Javascript)

Preview:

Implementation:

React

Swift

--

--