Skip to content

Improve React Native Transport Support and Compatibility #3247

@luisawatkins

Description

@luisawatkins

Overview

React Native applications currently face significant limitations when using js-libp2p, with limited transport support and ongoing compatibility issues that hinder mobile app adoption.

Current Limitations

  • Limited Transport Support: Not all transports are supported in React Native environment
  • TCP Support Issues: Ongoing problems with TCP transport implementation
  • Dependency Compatibility: Some underlying dependencies don't work as expected in React Native
  • Platform Differences: Inconsistent behavior between iOS and Android platforms

Impact

  • Critical for Mobile Adoption: Prevents mobile apps from fully leveraging libp2p capabilities
  • User Experience: Limited functionality reduces the appeal of mobile p2p applications
  • Market Reach: Excludes a significant portion of potential users

Proposed Solutions

  1. Transport Layer Improvements

    • Enhance WebRTC transport for React Native
    • Implement fallback mechanisms for unsupported transports
    • Add transport detection and graceful degradation
  2. Dependency Resolution

    • Audit and fix React Native incompatible dependencies
    • Create React Native specific polyfills where needed
    • Implement platform-specific code paths
  3. Testing & Validation

    • Add comprehensive React Native testing suite
    • Test on both iOS and Android platforms
    • Validate with real React Native applications

Technical Details

  • Affected Packages: @libp2p/transport-webrtc, @libp2p/transport-tcp
  • Platforms: React Native (iOS/Android)
  • Dependencies: react-native-webrtc, platform-specific modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions