Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 2.82 KB

File metadata and controls

70 lines (44 loc) · 2.82 KB

TextToQR

Simple macOS SwiftUI app to generate QR codes from text using Core Image.

Screenshot 2025-09-12 at 4 54 44 PM

Latest Build

QRCodeGenerator.zip

Overview

TextToQR renders a QR code for any text you type. It uses the CIQRCodeGenerator Core Image filter with error correction level "H", scales the image to 300×300, and displays it as an NSImage inside a SwiftUI view.

Features

  • App-managed storage: files saved under Application Support in the app container (no folder selection)
  • Folder-based management within the app’s library; create subfolders, browse, and save into them
  • Load/save QR texts as files (.txt, .qr, .qrtext)
  • Export/Import the entire library as a single .csv file and clear the saved library from the File menu
  • Edit and generate QR without saving; choose to Save or Save As later
  • Live preview as you type (no Render button)
  • Core Image–based QR generation with error correction
  • Fixed-size window for a focused utility experience

Quick Start

  • Open QRCodeGenerator/QRCodeGenerator.xcodeproj in Xcode (macOS app target).
  • Build and run.
  • The app stores QR texts under Application Support/<bundle id>/QRCodes.
  • Start typing to generate a QR without saving; click Save or Save As to persist within the app library.
  • Or select a file to load and regenerate its QR; edit and Save to update that file.
  • Use File → Export Library… to save a snapshot (.csv), and File → Import Library… to merge from a snapshot.
    • CSV schema: header folder,filename,text,order. folder is a relative path inside the library (blank for the root). Text is stored with literal \n, and order preserves the display ordering.

See docs/DEVELOPMENT.md for detailed setup instructions.

Architecture

  • QRCodeGeneratorApp initializes the main window and hosts ContentView.
  • ContentView manages input state and triggers QR generation.
  • QRCodeGenerator encapsulates QR creation, scaling, and CI→NSImage conversion.
  • NSImageView (SwiftUI view) renders an optional NSImage or a placeholder.

More details in docs/ARCHITECTURE.md.

Roadmap Ideas

  • Export/copy/save QR image
  • Adjustable size and error correction level (L/M/Q/H)
  • Input validation and better empty-state UX
  • Crisper scaling via CIContext + CGImage with no interpolation

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and open an issue to discuss substantial changes.

Troubleshooting

Common fixes and tips are in docs/TROUBLESHOOTING.md.

License

This project is licensed under the MIT License. See LICENSE for details.

Links