Skip to content

Conversation

@sfourdrinier
Copy link

Summary

  • Adds optional iOS BLE restoration subspec for state restoration functionality
  • Includes config plugin options for Expo integration
  • Allows developers to opt-in to BLE state restoration feature

Changes

  • Created new subspec for iOS BLE restoration capabilities
  • Added configuration plugin options
  • Maintains backward compatibility

🤖 Generated with Claude Code

sfourdrinier and others added 9 commits July 11, 2025 15:07
- Improved null/nil handling in createClient method
- Changed dispatch queue from self.methodQueue to dispatch_get_main_queue()
- Added null/nil checks for filteredUUIDs and options in startDeviceScan

This patch fixes potential crashes when null values are passed from JavaScript
to the native iOS implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced all yarn commands with pnpm equivalents
- Changed package name to @sfourdrinier/react-native-ble-plx
- Added missing @expo/config-plugins dependency
- Added *.tsbuildinfo to gitignore

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This prevents build errors when publishing to npm

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…reject (#1)

- Add DEFAULT_ERROR_CODE = "BlePlxError" constant
- Replace all reject(null, ...) calls with reject(DEFAULT_ERROR_CODE, ...)
- Prevents NullPointerException in RN 0.81 when errors are surfaced through native bridge

Fixes NPE crash that occurs when using react-native-ble-plx with React Native 0.81+
where PromiseImpl.reject now requires a non-null error code parameter.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
- Fix Android RN 0.81 NPE with non-null error codes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing RestoreStateEvent to BleModule mock
- Reset BleManager singleton state between tests
- Fix monitor method expectations to match platform-specific behavior (iOS doesn't pass subscriptionType parameter)
- All 80 tests now passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant