Universal App Store Redirect Service
This service automatically redirects users to the appropriate app store based on their platform and the provided app ID format.
Usage
Make a GET request to the redirect endpoint with a single app identifier:
GET /redirect?id=<app_identifier>
The id parameter accepts:
- iOS App Store ID - Numeric value (e.g.,
1234567890)
- Android Bundle ID - Package name format (e.g.,
com.example.myapp)
Examples
# iOS App Store ID
curl "http://localhost:8087/redirect?id=1234567890"
# Android Bundle ID
curl "http://localhost:8087/redirect?id=com.example.myapp"
Redirect Logic
The service automatically determines the appropriate store based on:
- User's platform (iOS/Android/Other)
- ID format (numeric for iOS, bundle format for Android)
Redirect behavior:
- iOS device + iOS ID → App Store ✅
- Android device + Android ID → Google Play ✅
- Android device + iOS ID → App Store (fallback) ⚠️
- iOS device + Android ID → Error (incompatible) ❌
- Other platforms + iOS ID → App Store (fallback) ⚠️
- Other platforms + Android ID → Error (incompatible) ❌
The service will:
- Display a loading page
- Detect user's platform and analyze ID format
- Collect device information using JavaScript
- Send analytics data to the configured endpoint
- Redirect to the appropriate store or show an error