# SelfieRingLight A modern, professional-grade selfie camera app for iOS that simulates a high-quality ring light using the device's screen. Built entirely with SwiftUI, Swift 6, and AVFoundation. Perfect for low-light selfies, video calls, makeup checks, or professional portrait lighting on the go. ## Features ### Core Camera & Lighting - Full-screen front-camera preview with true mirror option - Configurable **screen-based ring light** with adjustable border thickness - Multiple color temperature presets (Pure White, Warm Cream, Ice Blue, Rose Pink, etc.) - **Directional gradient lighting** for flattering portrait effects - Real-time screen brightness control (overrides system brightness while in use) - Flash burst on capture for extra fill light ### Capture Modes - Photo capture (saved to Photo Library) - Video recording - **Boomerang** mode (3-second looping short video) - 3-second and 10-second self-timer with countdown overlay and VoiceOver announcements - Pinch-to-zoom gesture - Volume button shutter support (photo or video start/stop) - Rule-of-thirds grid overlay (toggleable) ### Premium Features (Freemium Model) - All advanced color presets + custom colors - Gradient and directional lighting - Advanced beauty filters (coming soon) - Unlimited boomerang length - No watermarks - Ad-free experience ### Accessibility & Polish - Full VoiceOver support with meaningful labels, hints, and announcements - Dynamic Type and ScaledMetric for readable text - String Catalog localization ready (`.xcstrings`) - Prevents screen dimming during use - Restores original brightness on background/app close ## Screenshots *(Add App Store-ready screenshots here once built)* ## Requirements - iOS 18.0 or later - Xcode 16+ - Swift 6 language mode ## Setup ### 1. Clone the Repository ```bash git clone https://github.com/yourusername/SelfieRingLight.git cd SelfieRingLight ``` ### 2. Configure API Keys This project uses `.xcconfig` files to securely manage API keys. **Never commit your actual API keys to version control.** 1. Copy the template file: ```bash cp SelfieRingLight/Configuration/Secrets.xcconfig.template SelfieRingLight/Configuration/Secrets.xcconfig ``` 2. Edit `Secrets.xcconfig` with your actual API key: ``` REVENUECAT_API_KEY = appl_your_actual_api_key_here ``` 3. The `Secrets.xcconfig` file is gitignored and will never be committed. ### 3. RevenueCat Setup 1. Create an account at [RevenueCat](https://www.revenuecat.com) 2. Create a new project and connect it to App Store Connect 3. Create products in App Store Connect (e.g., `com.yourapp.pro.monthly`, `com.yourapp.pro.yearly`) 4. Configure the products in RevenueCat dashboard 5. Create an entitlement named `pro` 6. Create an offering with your subscription packages 7. Copy your **Public App-Specific API Key** to `Secrets.xcconfig` ### 4. Debug Premium Mode To test premium features without a real subscription during development: 1. Edit Scheme (⌘⇧<) → Run → Arguments 2. Add Environment Variable: - **Name:** `ENABLE_DEBUG_PREMIUM` - **Value:** `1` This unlocks all premium features in DEBUG builds only. ### 5. CI/CD Configuration For automated builds, set the `REVENUECAT_API_KEY` environment variable in your CI/CD system: **GitHub Actions:** ```yaml env: REVENUECAT_API_KEY: ${{ secrets.REVENUECAT_API_KEY }} ``` **Xcode Cloud:** Add `REVENUECAT_API_KEY` as a secret in your Xcode Cloud workflow. ## Privacy - Camera access required for preview and capture - Photo Library access required to save photos/videos - Microphone access required for video recording - No data collection, no analytics, no tracking ## Monetization Freemium model with optional "Pro" subscription: - Free: Basic ring light, standard colors, photo/video, timer, zoom - Pro: Full color palette, gradients, advanced features, future updates Implemented with RevenueCat for reliable subscription management. ## Project Structure ``` SelfieRingLight/ ├── App/ # App entry point ├── Features/ │ ├── Camera/ # Camera preview, capture, view model │ ├── Paywall/ # Pro subscription flow │ └── Settings/ # Configuration screens ├── Shared/ │ ├── Configuration/ # xcconfig files (API keys) │ ├── Premium/ # PremiumManager (RevenueCat) │ ├── Protocols/ # Shared protocols │ ├── Color+Extensions.swift # Ring light color presets │ └── DesignConstants.swift # Design tokens └── Resources/ # Assets, localization ``` ## License *(Add your license here)*