Skip to content

Apple-platform (iOS/tvOS) build support + Darwin TCP keepalive - #291

Merged
batchar2 merged 3 commits into
masterfrom
apple-build-support
Jun 14, 2026
Merged

batchar2 merged 3 commits into
masterfrom
apple-build-support

Conversation

@pavel-shpilev

Copy link
Copy Markdown
Collaborator

Why

The iOS/tvOS clients build libfptn directly from this repo as a submodule. Today they carry a small private fork (mrmidi/fptn) with these build adaptations on top of upstream. Merging them here gives one libfptn lineage for desktop, Android, and Apple — no divergent fork to maintain. After merge, the Apple client's submodule repoints to upstream.

All changes are Apple-build-only (guarded by os / __APPLE__ / TARGET_OS_IPHONE) and do not affect Linux/Windows/Android builds.

What (5 files, ~52 lines)

  • .conan/recipes/boringssl/conanfile.py — generalize the iOS cross-build settings to iOS and tvOS (pick appletvos/appletvsimulator vs iphoneos/iphonesimulator by os + os.sdk); add tvOS to the Security/Foundation frameworks; strip install(TARGETS bssl) to avoid an install-target conflict during the framework build.
  • conanfile.py — add camouflage-tls to the consumed static libs; extend boost.without_process to tvOS (matching iOS/Android).
  • src/common/network/utils.h — compile out GetServerIpAddresses() (which shells out via common/system/command.h) on iOS, mirroring the existing Android guard. iOS apps can't spawn shell commands.
  • src/fptn-protocol-lib/CMakeLists.txt — bump the iOS target to C++20 (was 17).
  • src/fptn-protocol-lib/https/websocket_client/websocket_client.cpp — enable TCP keepalive and, on Darwin, tune TCP_KEEPALIVE/TCP_KEEPINTVL/TCP_KEEPCNT (15s/5s/3) so the kernel probes the connection during device sleep without app CPU — improves mobile reconnect behavior.

Notes

  • The last two commits ("add commented-out keepalive" then "uncomment") are squashable — feel free to squash-merge.
  • Verified: with these applied on top of master, libfptn builds as an iOS-simulator framework and the iOS client's control plane (login / /api/v1/dns / TLS handshake) works against a live server.

mrmidi added 3 commits June 13, 2026 15:57
- BoringSSL conan recipe: add tvOS SDK support (appletvos/appletvsimulator)
- Conanfile: add camouflage-tls to library list, add tvOS to options
- Network utils: exclude common/system/command.h on iOS (not available)
- fptn-protocol-lib CMake: upgrade CXX_STANDARD 17→20
@batchar2
batchar2 merged commit 5673d33 into master Jun 14, 2026
3 of 5 checks passed
@batchar2
batchar2 deleted the apple-build-support branch June 14, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants