diff --git a/src/client/ring_signal.cpp b/src/client/ring_signal.cpp
index b8fd4b083ffc4c04b255a9d0cd21ae6e528438d8..b29ab291f6c8799d54e1666c7acb47ad696d6ee7 100644
--- a/src/client/ring_signal.cpp
+++ b/src/client/ring_signal.cpp
@@ -73,10 +73,10 @@ getSignalHandlers()
         exported_callback<DRing::ConfigurationSignal::MigrationEnded>(),
         exported_callback<DRing::ConfigurationSignal::DeviceRevocationEnded>(),
         exported_callback<DRing::ConfigurationSignal::Error>(),
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
         exported_callback<DRing::ConfigurationSignal::GetHardwareAudioFormat>(),
 #endif
-#if defined(__ANDROID__) || TARGET_OS_IOS || defined(RING_UWP)
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS) || defined(RING_UWP)
         exported_callback<DRing::ConfigurationSignal::GetAppDataPath>(),
 #endif
 
diff --git a/src/dring/configurationmanager_interface.h b/src/dring/configurationmanager_interface.h
index 409e0b1af94d28b931318a2a5c46d14147050c57..ec08d52f91888b943e7721fbdb0574565f62e3d2 100644
--- a/src/dring/configurationmanager_interface.h
+++ b/src/dring/configurationmanager_interface.h
@@ -282,13 +282,13 @@ struct ConfigurationSignal {
          * These are special getters for Android and UWP, so the daemon can retreive
          * information only accessible through their respective platform APIs
          */
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
         struct GetHardwareAudioFormat {
                 constexpr static const char* name = "GetHardwareAudioFormat";
                 using cb_type = void(std::vector<int32_t>* /* params_ret */);
         };
 #endif
-#if defined(__ANDROID__) || defined(RING_UWP) || TARGET_OS_IOS
+#if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
         struct GetAppDataPath {
                 constexpr static const char* name = "GetAppDataPath";
                 using cb_type = void(const std::string& name, std::vector<std::string>* /* path_ret */);
diff --git a/src/fileutils.cpp b/src/fileutils.cpp
index c08336d215f79c7901a4d622ddf6583705028845..0a5564af4768825579eacbb0ede16dbf8e3b840b 100644
--- a/src/fileutils.cpp
+++ b/src/fileutils.cpp
@@ -37,7 +37,7 @@
 #include <TargetConditionals.h>
 #endif
 
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
 #include "client/ring_signal.h"
 #endif
 #ifdef _WIN32
@@ -175,7 +175,7 @@ create_pidfile()
 std::string
 expand_path(const std::string &path)
 {
-#if defined __ANDROID__ || defined RING_UWP || defined WIN32 || TARGET_OS_IOS
+#if defined __ANDROID__ || defined RING_UWP || defined WIN32 || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
     RING_ERR("Path expansion not implemented, returning original");
     return path;
 #else
@@ -417,7 +417,7 @@ FileHandle::~FileHandle()
     }
 }
 
-#if defined(__ANDROID__) || defined(RING_UWP) || TARGET_OS_IOS
+#if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
 static std::string files_path;
 static std::string cache_path;
 static std::string config_path;
@@ -451,7 +451,7 @@ get_cache_dir()
         return cache_home;
     } else {
 #endif
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
         std::vector<std::string> paths;
         emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("cache", &paths);
         if (not paths.empty())
@@ -473,7 +473,7 @@ get_cache_dir()
 std::string
 get_home_dir()
 {
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
     std::vector<std::string> paths;
     emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths);
     if (not paths.empty())
@@ -517,7 +517,7 @@ get_home_dir()
 std::string
 get_data_dir()
 {
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
     std::vector<std::string> paths;
     emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths);
     if (not paths.empty())
@@ -553,7 +553,7 @@ get_data_dir()
 std::string
 get_config_dir()
 {
-#if defined(__ANDROID__) || TARGET_OS_IOS
+#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
     std::vector<std::string> paths;
     emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("config", &paths);
     if (not paths.empty())