Skip to content

Conversation

@ignaciosantise
Copy link
Collaborator

This pull request adds a new permission description to the app configuration to support Bluetooth functionality. The change clarifies to users why Bluetooth access is required.

Permissions update:

  • Added NSBluetoothAlwaysUsageDescription to the infoPlist in dapps/pos-app/app.json, explaining that Bluetooth is needed to print receipts.

Copilot AI review requested due to automatic review settings November 28, 2025 19:44
@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-native-examples Building Building Preview Comment Nov 28, 2025 7:44pm

@ignaciosantise ignaciosantise merged commit b937f51 into main Nov 28, 2025
7 of 8 checks passed
@ignaciosantise ignaciosantise deleted the chore/bluetooth-ios branch November 28, 2025 19:45
@claude
Copy link

claude bot commented Nov 28, 2025

Claude finished @ignaciosantise's task —— View job


Post-merge Review Complete

  • Read changed file and examine diff
  • Review iOS permission string implementation
  • Run automated security checks
  • Report findings

Review Findings

Issue 1: Incomplete permission configuration (dapps/pos-app/app.json:21)

The PR adds NSBluetoothAlwaysUsageDescription but iOS Bluetooth permissions require careful consideration:

  • NSBluetoothAlwaysUsageDescription requests "always" Bluetooth access, which is the most permissive level
  • For printing receipts, NSBluetoothPeripheralUsageDescription (iOS 13+) or the less intrusive "while using" permission may be more appropriate
  • The permission description "This app requires Bluetooth to print receipts" is functional but could be more user-friendly (e.g., "WPay needs Bluetooth access to connect to receipt printers")

Issue 2: Permission scope mismatch (dapps/pos-app/app.json:18-22, 122-128)

The react-native-permissions plugin configuration (lines 122-128) declares "Bluetooth" permission, but this is a generic declaration. The specific NSBluetoothAlwaysUsageDescription in infoPlist indicates "always" access. Verify that:

  • The app actually needs "always" access (background Bluetooth) vs "while using"
  • The permission plugin configuration aligns with the actual permission usage patterns
  • For receipt printing only, "while using" access should be sufficient

Issue 3: Android permission asymmetry (dapps/pos-app/app.json:39-46)

Android configuration includes multiple Bluetooth permissions (BLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_CONNECT, BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE), but there's no corresponding user-facing permission description in Android's manifest. While not technically required for Android (permissions are granted at install), consider adding descriptive text for consistency and user transparency.


Since this PR is already merged, these issues would need to be addressed in a follow-up PR if changes are desired.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds iOS Bluetooth permission configuration to support the app's receipt printing functionality via Bluetooth thermal printers. The change adds a user-facing permission description to explain why Bluetooth access is required.

  • Added NSBluetoothAlwaysUsageDescription to iOS infoPlist configuration
  • Permission description follows existing pattern with clear explanation of Bluetooth usage for printing receipts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

"NFCReaderUsageDescription": "This app requires NFC to send messages",
"NSLocationWhenInUseUsageDescription": "This app requires location when using the camera"
"NSLocationWhenInUseUsageDescription": "This app requires location when using the camera",
"NSBluetoothAlwaysUsageDescription": "This app requires Bluetooth to print receipts"
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key NSBluetoothAlwaysUsageDescription has been deprecated since iOS 13. For apps that connect to Bluetooth peripherals (like printers), the correct key to use is NSBluetoothPeripheralUsageDescription. Consider updating this to use the recommended key:

"NSBluetoothPeripheralUsageDescription": "This app requires Bluetooth to print receipts"

This ensures compatibility with current iOS versions and follows Apple's current guidelines.

Suggested change
"NSBluetoothAlwaysUsageDescription": "This app requires Bluetooth to print receipts"
"NSBluetoothPeripheralUsageDescription": "This app requires Bluetooth to print receipts"

Copilot uses AI. Check for mistakes.
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.

2 participants