Skip to content

Multi-targeted iOS app heads (net10.0;net10.0-ios) are classified Neutral, so ios build/package/upload find no heads and exit green #195

Description

@matt-edmondson

Plan

docs/ios-support-plan.md L118–125:

handle multi-targeting (<TargetFrameworks>) by treating the project as iOS-capable if any TFM is an iOS TFM.

What exists today

  • DotNetService.GetIosHeads (KtsuBuild/DotNet/DotNetService.cs around lines 407–412) requires GetProjectPlatform(p) == ProjectPlatform.Ios && IsExecutableProject(p).
  • ClassifyTargetFrameworks (around lines 555–590) returns Neutral whenever any TFM is neutral. That rule is right for host gating and is pinned by GetProjectPlatform_MultiTargetWithNeutral_ReturnsNeutral, but it means an OutputType=Exe project with <TargetFrameworks>net10.0;net10.0-ios</TargetFrameworks> is never an iOS head.
  • IosService.ResolveIosFramework already picks the iOS TFM out of a multi-target project (ResolveIosFramework_MultiTarget_PicksIosTfm). Packaging therefore expects these heads; only detection is missing.

Failure scenario

For a repository whose app head multi-targets desktop and iOS:

  • ktsubuild ios build logs "No iOS heads found… Nothing to build" and exits 0.
  • ci's iOS validation logs this at verbose level only.
  • ios package and ios upload package and upload nothing, and the run still goes green.

What's missing and acceptance criteria

  • Detect iOS heads as "executable and any TFM matches net\d+\.\d+-ios", separately from the host-gating ProjectPlatform classification. Leave host gating unchanged.
  • BuildIosAsync passes -f <iosTfm>, reusing ResolveIosFramework, so a multi-target head isn't also built for net10.0 with an iOS RID.
  • Tests:
    • GetIosHeads returns a net10.0;net10.0-ios Exe project.
    • GetProjectPlatform for that project stays Neutral.
    • The build arguments for it include -f net10.0-ios.

Dependencies

This touches the same detection code as #192 (heads whose TFM comes from ktsu.Sdk.iOS, and $(...) tokens). Coordinate the two, or fix them in the same PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions