Skip to content

iOS builds link again: gen_build.py leaves IOBluetooth out of the iOS frameworks, as it does Cocoa - #1906

Closed
JakePre wants to merge 1 commit into
seedds:mainfrom
JakePre:ios-link-iobluetooth
Closed

JakePre wants to merge 1 commit into
seedds:mainfrom
JakePre:ios-link-iobluetooth

Conversation

@JakePre

@JakePre JakePre commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

What and why

Every IPA built from main currently stops at the link:

ld: framework 'IOBluetooth' not found

The iOS project takes its frameworks from dm/host/Makefile's link line through dm/ios/tools/gen_build.py, and that script skipped only Cocoa. Since a342d64, the line also has -framework IOBluetooth, for the Mac's own Bluetooth address when pairing Switch 2 controllers. pad_switch2_apple.m reads it only under TARGET_OS_OSX, but the iOS SDK has no such framework, so the link fails for every game.

gen_build.py now skips the Mac-only frameworks as a set: Cocoa and IOBluetooth. One line, plus its comment.

Checked

  • Found and checked on: Super Mario Galaxy (010099C022B96000, v327680) for iOS, built from main with ios: Switch 2 controllers on iPhone and iPad #1900's wiring on top.
    • Without this change: the link error above.
    • With it: the IPA builds and runs on an iPhone, with Joy-Con 2s over Bluetooth.
  • Tests: dm/ios/tests pass.
  • Not checked: an iPad, a game other than Galaxy (the framework list is the same for every game).

Docs

  • No finding to add: it's a build fix.
  • No chain tool changed
  • No game files, keys or extracted game data

🤖 Generated with Claude Code

… frameworks, as it does Cocoa

The iOS project takes its frameworks from dm/host/Makefile's link line, skipping Cocoa only. Since a342d64 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 seedds#1900.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the ios The iPhone and iPad app (dm/ios) label Nov 9, 2026
seedds added a commit that referenced this pull request Nov 9, 2026
… SDK has, so IOBluetooth (since a342d64, read only under TARGET_OS_OSX) and Cocoa stay out of the iOS link instead of failing it with "framework 'IOBluetooth' not found"; each one left out is named on stderr (PR #1906)

Co-authored-by: JakePre <130175182+JakePre@users.noreply.github.com>
@seedds

seedds commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Thanks — landed on main as 9983d65, with you as co-author. Your diagnosis was right: since a342d64 the Makefile links IOBluetooth, and gen_build.py passed it to the iOS link. Instead of a list of Mac-only names, gen_build.py now asks the iOS SDK (xcrun --sdk iphoneos --show-sdk-path) which frameworks it has and leaves the others out, naming them on stderr. Cocoa and IOBluetooth drop out the same way, and the next Mac-only framework can't break the iOS link. Checked with the unsigned iOS smoke build (build_smoke.py, link succeeds) and dm/ios/tests; the framework list it produces matches yours.

@seedds seedds closed this Nov 9, 2026
ycarogabriel-lgtm added a commit to ycarogabriel-lgtm/nxnative that referenced this pull request Nov 9, 2026
main 9983d65 (seedds#1906) fixed the iOS link that main's Bluetooth commit a342d64
had broken ("framework 'IOBluetooth' not found"), which was failing this PR's
"Unsigned iOS app" job although the diff does not touch it. Merging it gives
the job a tree that links, and re-runs every job of the PR on the current main,
the Sanitizers one among them (its failure was an audio test under TSan, which
this diff does not touch, and I cannot re-run a single job without admin rights).
No conflicts, no change to this PR's own files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 9, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
dsi-hub pushed a commit to dsi-hub/nxnative that referenced this pull request Nov 9, 2026
… SDK has, so IOBluetooth (since a342d64, read only under TARGET_OS_OSX) and Cocoa stay out of the iOS link instead of failing it with "framework 'IOBluetooth' not found"; each one left out is named on stderr (PR seedds#1906)

Co-authored-by: JakePre <130175182+JakePre@users.noreply.github.com>
(cherry picked from commit 9983d65)
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
… SDK has, so IOBluetooth (since 88f05d5, read only under TARGET_OS_OSX) and Cocoa stay out of the iOS link instead of failing it with "framework 'IOBluetooth' not found"; each one left out is named on stderr (PR seedds#1906)

Co-authored-by: JakePre <130175182+JakePre@users.noreply.github.com>
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 10, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 10, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 10, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 12, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 12, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 12, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
stan69b pushed a commit to stan69b/nxnative that referenced this pull request Nov 12, 2026
…ee's entrance with the guest in files and a 3.2 GB residency set; heavier views are GPU-bound

"For an iPhone or iPad build" under Memory: the device (iPad Pro 11-inch 3rd generation, M1,
8 GB, iPadOS 27.0.1), the memory limit and headroom (7.97 GB of room against the 9 GB pool,
so the guest in files; footprint 2.2-2.3 GB, headroom 5.87 GB at its lowest; working set
5,461 MB, residency set 3.2 GB with the GPU-only spans on), fps and GPU time (20.0 fps in
every window of two 32-minute runs at the Deku Tree's entrance, GPU 34-35 ms, game speed
0.97-1.00; heavier views 54-67 ms of GPU, 11-12 fps and game speed 0.53-0.61; the title and
game over screens 61 and 66-74 ms), no clock waits, no switch needed, and what is open: the
heavy views' GPU time, a GPU hang on an earlier build in the draws of PR seedds#1842's M1 hangs,
one kernel data abort, and PR seedds#1906 for an iOS build on 7ffa63c.

Found on: "Textures in GPU-only memory took an allocation per description"; memory.md's two
entries link the new section. The Open list's "no iOS run" line points at it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ios The iPhone and iPad app (dm/ios)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants