Skip to content

Migrate QR Scanner Away from Legacy Expo Camera API #48

Description

@Lakes41

Difficulty: Advanced

Type: Refactor

Summary

Update the QR scanner implementation to use the current Expo Camera API and remove the unresolved legacy import workaround.

Current Behaviour

app/access-scanner.tsx imports Camera, CameraType, and BarCodeScanningResult from expo-camera/legacy and includes an ESLint suppression for unresolved imports. This makes the scanner more fragile during Expo upgrades and hides a module resolution issue from linting.

Expected Behaviour

The scanner should use the supported Expo Camera API for the current Expo SDK version, without disabling lint rules for the import. QR scanning behaviour, permission handling, and navigation back to the access check screen should continue to work.

Suggested Implementation

Replace the legacy camera import with the current Expo Camera component and barcode scanning event types. Update scanner props to match the new API, keep QR-only scanning, and preserve the existing permission states. Add tests or documented manual verification for allowed, denied, and invalid QR payload scenarios.

Files or Areas Likely Affected

  • app/access-scanner.tsx
  • package.json
  • app.json
  • tests/
  • .maestro/

Acceptance Criteria

  • expo-camera/legacy is no longer imported.
  • The ESLint suppression for the camera import is removed.
  • QR scanning still accepts valid GuildPass access payloads.
  • Invalid QR payloads still show a clear error and allow scanning again.
  • Camera permission denied and permanently denied states remain usable.

Additional Notes

Keep the migration scoped to the scanner implementation. Do not redesign the QR payload format in this issue.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions