diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 1701d4fb4..db864b57e 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -2,6 +2,7 @@ set(exetargets lokinet) if(APPLE) add_executable(lokinet lokinet.swift) + target_compile_options(lokinet BEFORE PRIVATE -target x86_64-apple-macos${CMAKE_OSX_DEPLOYMENT_TARGET}) else() add_executable(lokinet lokinet.cpp) endif() diff --git a/daemon/lokinet.swift b/daemon/lokinet.swift index 9e3c67f35..da946e1d6 100644 --- a/daemon/lokinet.swift +++ b/daemon/lokinet.swift @@ -87,7 +87,9 @@ class LokinetMain: NSObject, NSApplicationDelegate { providerProtocol.serverAddress = "loki.loki" // Needs to be set to some non-null dummy value providerProtocol.username = "anonymous" providerProtocol.providerBundleIdentifier = self.netextBundleId - providerProtocol.enforceRoutes = true + if #available(macOS 11, *) { + providerProtocol.enforceRoutes = true + } // macos seems to have trouble when this is true, and reports are that this breaks and // doesn't do what it says on the tin in the first place. Needs more testing. providerProtocol.includeAllNetworks = false