fix: QR scanner crash on tap — missing camera permission #30

Closed
schwifty wants to merge 0 commits from schwifty/fix-qr-crash into main
Collaborator

Summary

  • Root cause: NSCameraUsageDescription missing from Info.plist — iOS kills the app instantly when camera access is requested without it
  • Fixed flash toggle crash (unconditional unlockForConfiguration after failed lockForConfiguration = SIGABRT)
  • Added error logging to camera setup instead of silent failures

Test plan

  • Open beacon app, tap QR scan — should show camera permission dialog, not crash
  • Deny permission, tap QR scan again — should show "Camera Access Required" screen
  • Toggle flash on/off rapidly while scanning — no crash

🤖 Generated with Claude Code

## Summary - **Root cause**: `NSCameraUsageDescription` missing from Info.plist — iOS kills the app instantly when camera access is requested without it - Fixed flash toggle crash (unconditional `unlockForConfiguration` after failed `lockForConfiguration` = SIGABRT) - Added error logging to camera setup instead of silent failures ## Test plan - [ ] Open beacon app, tap QR scan — should show camera permission dialog, not crash - [ ] Deny permission, tap QR scan again — should show "Camera Access Required" screen - [ ] Toggle flash on/off rapidly while scanning — no crash 🤖 Generated with [Claude Code](https://claude.com/claude-code)
schwifty added 1 commit 2026-03-22 21:45:23 +00:00
The app crashed immediately when tapping QR scan because the Info.plist
was missing the required NSCameraUsageDescription key. iOS kills the app
with EXC_BAD_INSTRUCTION when camera access is requested without it.

Also fixes:
- Flash toggle could SIGABRT if lockForConfiguration failed (try? + unconditional unlock)
- Camera setup now logs errors instead of silently failing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
schwifty closed this pull request 2026-03-22 22:32:48 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: payfrit/payfrit-beacon-ios#30
No description provided.