Coder Social home page Coder Social logo

mmendesas / sdk-bridge Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 0.0 2.4 MB

Communication between web and native side using react-native

JavaScript 4.18% TypeScript 59.54% Ruby 6.41% Java 19.62% Objective-C 6.31% Objective-C++ 2.06% HTML 0.78% CSS 1.10%
react-native react-native-webview react-native-webview-bridge sdk-bridge

sdk-bridge's Introduction

SDK BRIDGE

create-react-native-app

SDK Bridge implementation using React Native

Getting Started

You have to run two different projects in order to see it running locally

  • mobile:

    • adb reverse tcp:5173 tcp:5173: enable web-app port
    • npx react-native run-android: run native app inside android emulator
  • web:

Once you're up and running you can play with it, here are some examples

success error (declined)

Features

  • Communication between native-app (inapp-sdk) and webapp (web-sdk)
  • Sample webstore to simulate purchase flow
  • Simulated purchase authentication flow
  • Expiration timer to simulate wait for user action
  • State transition using XState (state machine)

How it works

  • Webstore was implemented on native side (green screens)
  • Authentication flow was implemented on web side (pastel colors screens)
  • When a user press the buy button, we load the web app inside webview
  • From web-sdk we tell inapp-sdk to open/closes fullscreen mode

Built With

  • web

    • Vite - Next Generation Frontend Tooling
    • React.js โ€Š- The library for web and native user interfaces
    • XState - State machines and statecharts for the modern web.
  • mobile

Author

License

This project is licensed under the MIT License

sdk-bridge's People

Contributors

mmendesas avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.