// Function to detect iOS
function isIOS() {
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
}
// Function to detect Android
function isAndroid() {
return /Android/.test(navigator.userAgent);
}
// Redirect based on device
function redirectBasedOnDevice() {
if (isIOS()) {
window.location.href = 'https://apps.apple.com/in/app/screencoach/id1509516221'; // Replace 'ios_link' with your iOS link
} else if (isAndroid()) {
window.location.href = 'https://play.google.com/store/apps/details?id=com.lifetech_balance&hl=en&gl=US'; // Replace 'android_link' with your Android link
} else {
// If not iOS or Android, do something else or redirect to a default page
window.location.href = 'https://www.myscreencoach.com/download/'; // Replace 'default_link' with your default link
}
}
// Call the redirect function when the page loads
window.onload = redirectBasedOnDevice;