diff --git a/CMake/iOS.cmake b/CMake/iOS.cmake index 6df984d88..2b488c021 100644 --- a/CMake/iOS.cmake +++ b/CMake/iOS.cmake @@ -48,9 +48,9 @@ endif (CMAKE_UNAME) # Force the compilers to gcc for iOS set (CMAKE_C_COMPILER /usr/bin/gcc) set (CMAKE_CXX_COMPILER /usr/bin/g++) -set(CMAKE_AR ar CACHE FILEPATH "" FORCE) -set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) -set(PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE) +set (CMAKE_AR ar CACHE FILEPATH "" FORCE) +set (CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) +set (PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE) # Setup iOS platform unless specified manually with IOS_PLATFORM if (NOT DEFINED IOS_PLATFORM) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6db26439b..c8e0052b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,6 @@ prevent_in_source_build() option(TD_ENABLE_JNI "Use \"ON\" to enable JNI-compatible TDLib API.") option(TD_ENABLE_DOTNET "Use \"ON\" to enable generation of C++/CLI or C++/CX TDLib API bindings.") -option(TD_EXPERIMENTAL_WATCH_OS "Use \"ON\" to enable watch os support.") if (TD_ENABLE_DOTNET AND (CMAKE_VERSION VERSION_LESS "3.1.0")) message(FATAL_ERROR "CMake 3.1.0 or higher is required. You are running version ${CMAKE_VERSION}.") diff --git a/example/ios/build.sh b/example/ios/build.sh index 5f9372dc8..4c5aaa5ba 100755 --- a/example/ios/build.sh +++ b/example/ios/build.sh @@ -36,10 +36,8 @@ do if [[ $platform = "macOS" ]]; then other_options="-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64'" else - watchos="" if [[ $platform = "watchOS" ]]; then ios_platform="WATCH" - watchos="-DTD_EXPERIMENTAL_WATCH_OS=ON" elif [[ $platform = "tvOS" ]]; then ios_platform="TV" else @@ -54,7 +52,7 @@ do fi echo "iOS platform = ${ios_platform}" - other_options="${watchos} -DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake" + other_options="-DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake" fi set_cmake_options $platform diff --git a/td/mtproto/RawConnection.cpp b/td/mtproto/RawConnection.cpp index b8f733871..d26f48a1d 100644 --- a/td/mtproto/RawConnection.cpp +++ b/td/mtproto/RawConnection.cpp @@ -11,7 +11,7 @@ #include "td/mtproto/ProxySecret.h" #include "td/mtproto/Transport.h" -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS #include "td/net/DarwinHttp.h" #endif @@ -259,7 +259,7 @@ class RawConnectionDefault final : public RawConnection { } }; -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS class RawConnectionHttp final : public RawConnection { public: RawConnectionHttp(IPAddress ip_address, unique_ptr stats_callback) @@ -452,7 +452,7 @@ class RawConnectionHttp final : public RawConnection { unique_ptr RawConnection::create(IPAddress ip_address, SocketFd socket_fd, TransportType transport_type, unique_ptr stats_callback) { -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS return td::make_unique(ip_address, std::move(stats_callback)); #else return td::make_unique(std::move(socket_fd), transport_type, std::move(stats_callback)); diff --git a/td/telegram/net/ConnectionCreator.cpp b/td/telegram/net/ConnectionCreator.cpp index f0216019a..9dfdb055a 100644 --- a/td/telegram/net/ConnectionCreator.cpp +++ b/td/telegram/net/ConnectionCreator.cpp @@ -705,7 +705,7 @@ Result ConnectionCreator::find_connection(const Proxy &proxy, const IP bool prefer_ipv6 = G()->shared_config().get_option_boolean("prefer_ipv6") || (proxy.use_proxy() && proxy_ip_address.is_ipv6()); bool only_http = proxy.use_http_caching_proxy(); -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS only_http = true; #endif TRY_RESULT(info, dc_options_set_.find_connection( diff --git a/tdnet/CMakeLists.txt b/tdnet/CMakeLists.txt index c81d031b4..0673961d6 100644 --- a/tdnet/CMakeLists.txt +++ b/tdnet/CMakeLists.txt @@ -48,7 +48,7 @@ set(TDNET_SOURCE td/net/Wget.h ) -if (TD_EXPERIMENTAL_WATCH_OS) +if (APPLE_WATCH) set(TDNET_SOURCE ${TDNET_SOURCE} td/net/DarwinHttp.mm @@ -77,7 +77,7 @@ if (WIN32) endif() endif() -if (TD_EXPERIMENTAL_WATCH_OS) +if (APPLE_WATCH) find_library(FOUNDATION_LIBRARY Foundation REQUIRED) target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY}) endif() diff --git a/tdutils/td/utils/config.h.in b/tdutils/td/utils/config.h.in index a9fad9efe..f8b89aeb5 100644 --- a/tdutils/td/utils/config.h.in +++ b/tdutils/td/utils/config.h.in @@ -6,4 +6,3 @@ #cmakedefine01 TD_HAVE_COROUTINES #cmakedefine01 TD_HAVE_ABSL #cmakedefine01 TD_FD_DEBUG -#cmakedefine01 TD_EXPERIMENTAL_WATCH_OS diff --git a/tdutils/td/utils/port/SocketFd.cpp b/tdutils/td/utils/port/SocketFd.cpp index 15e448a19..61e8ef87a 100644 --- a/tdutils/td/utils/port/SocketFd.cpp +++ b/tdutils/td/utils/port/SocketFd.cpp @@ -622,7 +622,7 @@ Result SocketFd::from_native_fd(NativeFd fd) { } Result SocketFd::open(const IPAddress &address) { -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS return SocketFd{}; #endif diff --git a/test/http.cpp b/test/http.cpp index d70f987bb..26c9d0c84 100644 --- a/test/http.cpp +++ b/test/http.cpp @@ -6,7 +6,7 @@ // #include "data.h" -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS #include "td/net/DarwinHttp.h" #endif @@ -468,7 +468,7 @@ TEST(Http, gzip_bomb_with_limit) { ASSERT_TRUE(ok); } -#if TD_EXPERIMENTAL_WATCH_OS +#if TD_DARWIN_WATCH_OS struct Baton { std::mutex mutex; std::condition_variable cond;