How getphyllo/phyllo-connect-reactnative works
Project type and purpose
• This is a React Native SDK module ("react-native-phyllo-connect") that provides a JavaScript interface and native bridges for Android and iOS to integrate the Phyllo Connect flow into a React Native app.
• Its purpose is to expose Phyllo’s account-connection UI and events to a React Native application via a JS API and underlying native modules.
File structure
• Top-level files and directories:
• src/ – TypeScript implementation of the JS API and event emitter
• ios/ – Xcode project and Objective-C/Swift bridging code for iOS
• android/ – Java/Kotlin React Native module wrapper for Android
• example/ – a sample React Native app that demonstrates SDK usage on both platforms
• config files (babel.config.js, tsconfig.json, podspec, build.gradle, package.json, etc.)
• Patterns and architectural choices:
• Bridge pattern – JS ↔ native boundary on each platform
• Event-emitter for callback subscriptions
• Separate platform folders (android/, ios/) implementing the same interface signature
README for additional insights
• The README documents initialization, event subscriptions, and how to open the connection screen.
• It references Phyllo’s backend API for user-token generation.
• It outlines the configuration object and lifecycle events (accountConnected, exit, etc.).