mirror of
https://github.com/wahyd4/links.git
synced 2026-08-09 05:06:16 +10:00
3.1 KiB
3.1 KiB
iOS Spotlight Search Integration for Heygo
Overview
The Heygo iOS app now supports system-wide Spotlight search integration. Users can search for their links directly from the iOS search screen without opening the app.
How It Works
Searching for Links
- Pull down from the home screen or swipe right to access iOS Spotlight search
- Type "heygo" followed by a space and then the beginning of your link alias
- Example: "heygo g" will show links that start with 'g' or contain 'g'
- Example: "heygo github" will show links with "github" in the alias, description, or tags
Opening Links
When you tap on a search result:
- Regular Links: Opens the URL directly in your default browser
- Template Links:
- If no parameters needed: Opens directly in browser
- If parameters needed: Opens the app to input parameters
- Custom Links: Opens the app to display the custom content
Click Tracking
Every time you open a link through Spotlight search, the app automatically:
- Increments the click counter for that link
- Records a click log entry with timestamp
- Updates the link's ranking for future searches
Technical Implementation
Files Modified/Created
Utils/SpotlightSearchManager.swift- Core Spotlight integration logicViewModels/LinkViewModel.swift- Added automatic indexing when links are created/updated/deletedHeygoApp.swift- Added user activity handling for Spotlight search resultsContentView.swift- Added notification handling for custom/template links
Key Features
- Automatic Indexing: Links are automatically indexed when created or updated
- Prefix Matching: Search supports partial matches (typing "g" finds "github", "google", etc.)
- Ranking: More frequently clicked links rank higher in search results
- Rich Metadata: Search results show link type icons and descriptions
- Clean Removal: Deleted links are automatically removed from search index
Search Optimization
The search implementation includes:
- App identifier keywords ("heygo", "link") for filtering
- Alias prefix matching for quick access
- Tag-based searching
- Link type classification
- Click-based ranking
Usage Examples
Quick Link Access
- Search: "heygo g" → Shows all links starting with 'g'
- Search: "heygo gmail" → Shows gmail-related links
- Search: "heygo" → Shows all your links
Tag-Based Search
- Search: "heygo work" → Shows links tagged with "work"
- Search: "heygo social" → Shows links tagged with "social"
Troubleshooting
Links Not Appearing in Search
- Make sure the app has been opened recently (triggers indexing)
- Try searching with "heygo" prefix
- Check if Spotlight indexing is enabled in iOS Settings → Siri & Search → Heygo
Search Results Not Opening Correctly
- Ensure the app is installed and not deleted
- Check if the link still exists in your collection
- For template links, make sure parameters are properly configured
Privacy Note
Link indexing happens locally on your device. Your links are not sent to Apple's servers beyond what's necessary for local Spotlight functionality.