diff --git a/src/manager.cpp b/src/manager.cpp
index 35b6cabe33ec48b3944a1be582c27079ca34ff70..fee8646af7181fdf60700787af58fd6302ccce94 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -2149,7 +2149,7 @@ Manager::playRingtone(const std::string& accountID)
     }
 
     std::string ringchoice = account->getRingtonePath();
-#ifdef TARGET_OS_IOS
+#if (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
     //for ios file located in main buindle
     CFBundleRef bundle = CFBundleGetMainBundle();
     CFURLRef bundleURL = CFBundleCopyBundleURL(bundle);