Skip to content

Commit 847c0bb

Browse files
committed
fix(build): make ds_tunnel_fd.c compile on iPhoneOS SDK (beta.39)
Drop private Darwin headers unavailable in the iOS SDK so Shared/C utun FD scan archives in CI.
1 parent cc88b3a commit 847c0bb

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to **decoder sec.** are documented here.
44

55
## [Unreleased]
66

7+
## [0.1.0-beta.39] — 2026-08-12
8+
9+
### Fixed
10+
- **iOS compile**: `ds_tunnel_fd.c` no longer includes `sys/sys_domain.h` / `net/if_utun.h` (not in iPhoneOS SDK). Uses Darwin constants only so IPA CI can archive.
11+
712
## [0.1.0-beta.38] — 2026-08-12
813

914
### Added (Xray docs gaps — Claude audit)

‎DecoderSec.xcodeproj/project.pbxproj‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
444444
CODE_SIGN_ENTITLEMENTS = DecoderSec/DecoderSec.entitlements;
445445
CODE_SIGN_STYLE = Automatic;
446-
CURRENT_PROJECT_VERSION = 38;
446+
CURRENT_PROJECT_VERSION = 39;
447447
DEVELOPMENT_TEAM = C7AS5D38Q8;
448448
ENABLE_PREVIEWS = YES;
449449
GENERATE_INFOPLIST_FILE = YES;
@@ -486,7 +486,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.decodersec.app;
486486
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
487487
CODE_SIGN_ENTITLEMENTS = DecoderSec/DecoderSec.entitlements;
488488
CODE_SIGN_STYLE = Automatic;
489-
CURRENT_PROJECT_VERSION = 38;
489+
CURRENT_PROJECT_VERSION = 39;
490490
DEVELOPMENT_TEAM = C7AS5D38Q8;
491491
ENABLE_PREVIEWS = YES;
492492
GENERATE_INFOPLIST_FILE = YES;
@@ -527,7 +527,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.decodersec.app;
527527
buildSettings = {
528528
CODE_SIGN_ENTITLEMENTS = DecoderSecTunnel/DecoderSecTunnel.entitlements;
529529
CODE_SIGN_STYLE = Automatic;
530-
CURRENT_PROJECT_VERSION = 38;
530+
CURRENT_PROJECT_VERSION = 39;
531531
DEVELOPMENT_TEAM = C7AS5D38Q8;
532532
GENERATE_INFOPLIST_FILE = YES;
533533
INFOPLIST_FILE = DecoderSecTunnel/Info.plist;
@@ -562,7 +562,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.decodersec.app.PacketTunnel;
562562
buildSettings = {
563563
CODE_SIGN_ENTITLEMENTS = DecoderSecTunnel/DecoderSecTunnel.entitlements;
564564
CODE_SIGN_STYLE = Automatic;
565-
CURRENT_PROJECT_VERSION = 38;
565+
CURRENT_PROJECT_VERSION = 39;
566566
DEVELOPMENT_TEAM = C7AS5D38Q8;
567567
GENERATE_INFOPLIST_FILE = YES;
568568
INFOPLIST_FILE = DecoderSecTunnel/Info.plist;

‎DecoderSec/Core/TunnelManager.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ final class TunnelManager: ObservableObject {
463463
if attempt >= 4 {
464464
let extensionSilent = !tunnelLogs.contains(where: { !$0.contains("[app]") })
465465
if extensionSilent {
466-
lastError = String(localized: "Packet Tunnel did not start (no extension logs). Large config is now passed via VPN profile only — reinstall 0.1.0 (38), or check NE signing in ESign.")
466+
lastError = String(localized: "Packet Tunnel did not start (no extension logs). Large config is now passed via VPN profile only — reinstall 0.1.0 (39), or check NE signing in ESign.")
467467
ClientLogBuffer.shared.append("FATAL: extension never logged — likely killed before startTunnel or wrong PacketTunnel bundle id")
468468
} else {
469469
lastError = String(localized: "Connection failed before the tunnel came up. Open Log console in Settings for details.")

‎Shared/C/ds_tunnel_fd.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#include "ds_tunnel_fd.h"
22

33
#include <errno.h>
4+
#include <stdint.h>
45
#include <string.h>
56
#include <unistd.h>
67
#include <sys/socket.h>
7-
#include <sys/sys_domain.h>
8-
#include <sys/kern_control.h>
9-
#include <net/if_utun.h>
8+
#include <sys/types.h>
109

11-
// AF_SYSTEM = 32 on Darwin; sockaddr_ctl layout uses ss_family at offset 1 for getpeername buffer.
10+
// iOS SDK does not ship sys/sys_domain.h, sys/kern_control.h, or net/if_utun.h.
11+
// Constants match Darwin (same values the old Swift TunnelFD used).
1212
#ifndef AF_SYSTEM
1313
#define AF_SYSTEM 32
1414
#endif

0 commit comments

Comments
 (0)