A lightweight cross-platform SwiftUI application for IpadOS and macOS that extracts, summarizes, and provides interactive Q&A for web content using Gemini or Apple's models ( local and cloud)
- Universal Web Loading: Load and display any web page in an integrated WebView
- Smart Content Extraction: Automatically extract meaningful content from web pages
- Reddit Integration: Special handling for Reddit posts with full comment extraction including nested threads
- Google Gemini Integration: Powered by Google's Gemini 2.5 Flash model for fast, accurate summaries
- **Option to use Apple local foundation model and also Apple's cloud model through the use of the SHortcuts app, since that cloud model is not available on the SDK
- Context-Aware Summaries: Different summarization approaches for Reddit vs. general web content
- Interactive Q&A: Ask questions about loaded content and get AI-powered answers
- Dual TTS Support:
- OpenAI TTS API for high-quality voice synthesis
- System voices including premium iOS voices (Ava, Zoe, etc.)
- Smart Text Chunking: Intelligent text splitting for natural speech flow
- Audio Caching: Efficient caching system for OpenAI TTS audio files
- Playback Controls: Full playback control with pause, resume, and progress tracking
- Dark Mode: Full dark mode support with system integration
- Adjustable Font Sizes: Customizable font sizing (10-24pt) affecting both UI and WebView content
- Cross-Platform: Native SwiftUI implementation for both iOS and macOS
- Bookmarks: Save and manage favorite URLs for quick access
- Multi-Tab Support: Handle multiple web pages simultaneously
- Content Blocking: iOS content blocking rules for ads and trackers
- Font Scaling: Dynamic WebView font scaling via CSS injection
- Responsive Design: Adaptive UI that works on iPhone, iPad, and Mac
- Secure API Key Storage: Keys stored securely in app preferences
- Xcode 26 beta + (for building and running)
- **iOS 26 beta macOS Tahoe beta
- Google Gemini API Key (required)
- ** To use Apple cloud model, it is rerquired to have this shortcut installed https://www.icloud.com/shortcuts/c968c84b2853425198c90f6a52e8a424
- On MAcOS shortucts app is running on the backgroud hrough its cli, so invisible ot user but on IpadOS it must open the SHortucts app while running the query t the model, there is no way around it.
- OpenAI API Key (optional, for enhanced TTS)
-
Clone the Repository
git clone https://github.com/Joaov41/URLSUM.git cd URLSUM -
Open in Xcode
open urlsum2.xcodeproj
-
Build and Run
For iOS Simulator:
xcodebuild -project urlsum2.xcodeproj -scheme urlsum2 -sdk iphonesimulator build
For macOS:
xcodebuild -project urlsum2.xcodeproj -scheme urlsum2 -sdk macosx build
Or simply press
Cmd+Rin Xcode to build and run
URLSum provides a built-in settings interface for configuring your API keys securely:
- Launch the app and tap the settings icon (βοΈ)
- API Keys section will be available in settings
- Enter your API keys:
- Gemini API Key: Required for content summarization
- OpenAI API Key: Optional, for enhanced TTS features
- Visit Google AI Studio
- Create a new API key
- Copy the key and paste it in URLSum settings
- Visit OpenAI API Keys
- Create a new API key
- Copy the key and paste it in URLSum settings
Note: API keys are stored securely in the app's user defaults and are not hardcoded in the source code.
- Enter URL: Type or paste any web URL in the input field
- Load Content: Tap "Load" to fetch and display the webpage
- Get Summary: Tap "Summarize" to generate an AI-powered summary
- Ask Questions: Use the Q&A feature to ask specific questions about the content
- URLSum automatically detects Reddit URLs
- Extracts complete comment threads including nested replies
- Provides comment count statistics
- Handles "load more" comments automatically
- After summarizing content, TTS controls will appear
- Choose voice type: OpenAI TTS or System voices
- Play/Pause: Control audio playback
- Premium voices available on iOS: Ava, Zoe, and other high-quality options
- Dark Mode: Toggle in the settings menu
- Font Size: Adjust from 10-24pt using the slider
- API Keys: Configure Gemini and OpenAI API keys
- AI Provider: Choose between different AI providers
- Bookmarks: Save frequently visited URLs
urlsum2/
βββ ContentView.swift # Main app logic and UI
βββ WebViewRepresentable.swift # Cross-platform WebView wrapper
βββ RedditAPI.swift # Reddit content extraction
βββ BookmarkManager.swift # URL bookmark management
βββ TTSViewModel.swift # Text-to-speech management
βββ OpenAIService.swift # OpenAI TTS integration
βββ TTSService.swift # System TTS integration
βββ Supporting Files/
βββ Assets.xcassets/ # App icons and images
βββ urlsum2App.swift # App entry point
βββ urlsum2.entitlements # App permissions
- GoogleGenerativeAI (0.5.6) - Google Gemini API integration
- SwiftSoup (2.7.6) - HTML parsing and content extraction
- Content blocking rules for improved privacy
- Premium system voices (Neural voices)
- Native iOS UI components and navigation
- AppKit integration where needed
- macOS-specific window management
- Native macOS UI patterns
β Secure API Key Storage: API keys are stored in app user defaults, not hardcoded β No Data Collection: The app processes content locally and only sends data to your configured AI services β Content Blocking: Built-in ad and tracker blocking for better privacy (iOS)
Run the test suite:
# Unit tests
xcodebuild test -project urlsum2.xcodeproj -scheme urlsum2 -sdk iphonesimulator
# macOS tests
xcodebuild test -project urlsum2.xcodeproj -scheme urlsum2 -sdk macosx- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is available for personal and educational use. Please respect the terms of service of the integrated APIs (Google Gemini, OpenAI).
API Key Errors:
- Ensure you've entered valid API keys in the app settings
- Check that your API quotas are not exceeded
- Verify your internet connection
Build Errors:
- Ensure you have the latest Xcode version
- Clean build folder:
Product > Clean Build Folder - Reset Package Dependencies:
File > Packages > Reset Package Caches
TTS Not Working:
- Check device volume settings
- Verify microphone permissions (if required)
- For iOS: ensure premium voices are downloaded in Settings > Accessibility > Spoken Content
- Ensure OpenAI API key is configured if using OpenAI TTS
WebView Issues:
- Try refreshing the page
- Check if the website blocks embedded views
- For Reddit: use old.reddit.com URLs for better compatibility
For issues, feature requests, or questions:
- Open an issue on GitHub
- Check the CLAUDE.md file for detailed technical documentation
URLSum 5.0 - Transform any web content into digestible, interactive summaries with the power of AI.