Skip to content

feat: scaffold net10.0-ios target for ImGui.App (phase 0 of iOS support)#180

Merged
matt-edmondson merged 2 commits into
mainfrom
claude/friendly-davinci-sjuX9
May 28, 2026
Merged

feat: scaffold net10.0-ios target for ImGui.App (phase 0 of iOS support)#180
matt-edmondson merged 2 commits into
mainfrom
claude/friendly-davinci-sjuX9

Conversation

@matt-edmondson
Copy link
Copy Markdown
Contributor

Summary

Phase 0 of multi-PR work to add iOS support to ImGui.App. This PR is scaffolding only — it adds the net10.0-ios TFM so the assembly can be compiled and referenced from iOS consumers, but the runtime backend (UIKit lifecycle + Metal renderer + touch input) lands in follow-ups against this same branch.

Changes

  • ImGui.App.csproj:

    • Add net10.0-ios to <TargetFrameworks>, conditional on $([MSBuild]::IsOSPlatform('OSX')) so Linux/Windows desktop builds (CI included) see the exact same TFM list as before.
    • Set <SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion> for iOS.
    • Move Silk.NET.* PackageReferences into an ItemGroup conditional on non-iOS.
    • Add <Compile Remove> entries on iOS for desktop-only sources: ImGuiApp.cs, ImGuiAppConfig.cs, ImGuiAppWindowState.cs, FontMemoryGuard.cs, ForceDpiAware.cs, GdiPlusHelper.cs, NativeMethods.cs, ImGuiController/**. (All verified to be either Silk-using or Windows-PInvoke files; none of the remaining sources depend on the excluded types.)
  • Platform/iOS/ImGuiApp.iOS.cs (new): minimal ImGuiApp static class guarded by #if IOS. Start() and Stop() throw PlatformNotSupportedException for now so the assembly compiles and the symbol exists, but consumer code that actually invokes it fails fast with a clear message.

Design notes

  • Why mac-only TFM activation? The iOS workload isn't supported on Linux (verified locally). Gating on IsOSPlatform('OSX') keeps Linux CI green while still building the iOS TFM on developer Macs and any future macOS CI runner.
  • Why exclude whole files rather than #if !IOS-wrapping them? ImGuiApp.cs alone is 1861 lines woven through with Silk.NET.* types — wrapping cleanly is more disruptive than excluding wholesale during scaffolding. Phase 1 will introduce a platform-abstraction layer so the desktop and iOS code paths share the bulk of the cross-platform logic.

Out of scope (follow-up PRs against this branch)

  • Phase 1: platform abstraction refactor (no behavioural change on desktop).
  • Phase 2/3: UIKit lifecycle (UIApplicationDelegate / MTKView) and Metal rendering wired through the upstream Hexa.NET ImGui Metal backend (depends on a ktsu-dev R&D sibling that produces iOS-arm64 + iossimulator-arm64 native runtimes for Hexa.NET.ImGui; that work is being coordinated with the Hexa author for upstream reconvergence).
  • Phase 4/5: touch + soft keyboard input, DPI/safe-area/orientation.
  • Phase 6: iOS demo .csproj.

Test plan

  • dotnet restore succeeds on Linux (TFM filter keeps net10.0-ios out of restore on non-macOS).
  • dotnet build -f net10.0 produces no new errors versus baseline. (Pre-existing SixLabors.ImageSharp 4.0.0 license error from Bump SixLabors.ImageSharp from 3.1.12 to 4.0.0 #179 still present and unrelated.)
  • dotnet build -f net10.0-ios on macOS with the iOS workload installed (cannot verify from Linux CI; needs developer/runner verification).
  • Examples (net10.0 only) and tests project unaffected — they resolve ImGui.App's net10.0 TFM exactly as before.

https://claude.ai/code/session_01XLQNGeHpAb5vCraERJLpUU


Generated by Claude Code

claude added 2 commits May 28, 2026 06:34
Phase 0 of iOS support. Adds the net10.0-ios TFM (mac-only via
IsOSPlatform condition so Linux/Windows desktop builds are unaffected),
guards Silk.NET PackageReferences and platform-specific source files out
of the iOS compile, and ships a throwing ImGuiApp stub so the assembly
can be referenced from iOS consumers without breaking the public API
surface.

The UIKit/Metal platform layer and the upstream Hexa.NET iOS native
runtimes land in follow-up PRs against this branch.

https://claude.ai/code/session_01XLQNGeHpAb5vCraERJLpUU
ImageSharp 4.0.0 (introduced by dependabot #179) requires a paid
commercial license and fails the build with NETSDK targets error:
"No Six Labors license found. Please obtain a license from
https://sixlabors.com/pricing/". The dependabot auto-merge bypassed
the CI build that would have caught this, leaving main red.

Pinning back to 3.1.12 (the last MIT-licensed version) unblocks this
PR and main. Long-term, the project should decide between purchasing
a license or migrating to an alternative image loader; that's out of
scope for the iOS scaffolding work on this branch.

https://claude.ai/code/session_01XLQNGeHpAb5vCraERJLpUU
@matt-edmondson matt-edmondson enabled auto-merge May 28, 2026 08:01
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
38 Security Hotspots
12.3% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@matt-edmondson matt-edmondson merged commit f2b8d57 into main May 28, 2026
4 of 5 checks passed
@matt-edmondson matt-edmondson deleted the claude/friendly-davinci-sjuX9 branch May 28, 2026 08:04
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.

2 participants