diff --git a/src/hooks/urlhook.cpp b/src/hooks/urlhook.cpp
index 1cd18fb5035464cec0be827d1060596e3520b2e0..7940de535eff72fa21d4866477dcd6152efb317b 100644
--- a/src/hooks/urlhook.cpp
+++ b/src/hooks/urlhook.cpp
@@ -29,7 +29,12 @@ int UrlHook::runAction(const std::string &command, const std::string &args)
     const std::string cmd = command + (args.empty() ? "" : " ") +
                             "\"" + args + "\" &";
 
-#if defined(RING_UWP) || defined(TARGET_OS_IOS)
+#if __APPLE__
+  #include "TargetConditionals.h"
+  #if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE)
+    return 0;
+  #endif
+#elif defined(RING_UWP)
     return 0;
 #else
     return system(cmd.c_str());