From 13f4fcf86629ee463f438dec6fa9f05672772870 Mon Sep 17 00:00:00 2001 From: JakePre <130175182+JakePre@users.noreply.github.com> Date: Sun, 8 Nov 2026 23:06:47 -0500 Subject: [PATCH] iOS builds link again: gen_build.py leaves IOBluetooth out of the iOS frameworks, as it does Cocoa The iOS project takes its frameworks from dm/host/Makefile's link line, skipping Cocoa only. Since a342d640 that line has -framework IOBluetooth (the Mac's own Bluetooth address for pairing Switch 2 controllers, read only under TARGET_OS_OSX in pad_switch2_apple.m), and the iOS SDK has no such framework, so every IPA build stopped at the link: "ld: framework 'IOBluetooth' not found". Found building Super Mario Galaxy for an iPhone from main plus the iOS wiring of #1900. Co-Authored-By: Claude Opus 5.5 --- dm/ios/tools/gen_build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dm/ios/tools/gen_build.py b/dm/ios/tools/gen_build.py index 66a9d8b3b6..9620c3d662 100644 --- a/dm/ios/tools/gen_build.py +++ b/dm/ios/tools/gen_build.py @@ -2,7 +2,7 @@ # without hand-copying lists: when the Makefile changes, the next iOS build follows automatically. # Gen/src/ symlinks to source files (excluding main.c and front_mac.m; main.c is linked separately to Gen/main/main.c and compiled with -Dmain=dm_main) # stdout xcconfig lines: HEADER_SEARCH_PATHS (-I directories + the directory of every source file, so relative includes resolve as usual), -# OTHER_CFLAGS (-D), frameworks (Cocoa is replaced by what the UIKit side already has, skipped) +# OTHER_CFLAGS (-D), frameworks (the Mac-only ones skipped: Cocoa, which the UIKit side replaces, and IOBluetooth, which only the Mac's Switch 2 transport reads: pad_switch2_apple.m) # Usage: gen_build.py import os, shlex, subprocess, sys host, gen = os.path.abspath(sys.argv[1]), os.path.abspath(sys.argv[2]) @@ -41,4 +41,5 @@ os.symlink(s, f'{gen}/src/{flat}') print('HEADER_SEARCH_PATHS = $(inherited) ' + ' '.join(f'"{d}"' for d in incs + dirs)) print('OTHER_CFLAGS = $(inherited) ' + ' '.join(defs)) -print('DM_FRAMEWORKS = ' + ' '.join(f'-framework {f}' for f in fws if f != 'Cocoa')) +MAC_ONLY = {'Cocoa', 'IOBluetooth'} # no such framework in the iOS SDK: linking it fails the build +print('DM_FRAMEWORKS = ' + ' '.join(f'-framework {f}' for f in fws if f not in MAC_ONLY))