Skip to content

Expose application artifacts#25707

Closed
Redth wants to merge 14 commits into
mainfrom
redth/apple-artifacts-plan
Closed

Expose application artifacts#25707
Redth wants to merge 14 commits into
mainfrom
redth/apple-artifacts-plan

Conversation

@Redth

@Redth Redth commented Jun 16, 2026

Copy link
Copy Markdown
Member

Apple platform builds and publishes now expose final artifacts through the shared @(ApplicationArtifact) item group. This gives custom targets and CI a stable way to discover .app, .ipa, .pkg, and .xcarchive outputs without parsing scalar properties, while leaving room for other platforms to use the same item group name.

Changes

  • Add @(ApplicationArtifact) collectors for app bundles, IPA packages, PKG installers, and Xcode archives.
  • Route Publish through GetApplicationArtifacts after _PrePublish, so publish-created artifacts run the same metadata extension path before Publish returns @(ApplicationArtifact).
  • Add GetApplicationArtifactsDependsOn so later SDK layers such as .NET MAUI can enrich @(ApplicationArtifact) metadata before GetApplicationArtifacts or Publish returns.
  • Route GetApplicationArtifacts through a mandatory private _CreateApplicationArtifacts target before extension targets run. That target runs Build plus the Apple app/package/archive producer targets so compiled outputs and platform artifacts exist before metadata enrichment.
  • Keep the producer targets condition-gated by the existing Apple properties and target conditions such as BuildIpa, CreatePackage, ArchiveOnBuild, _CanArchive, and SdkIsDesktop, so querying artifacts does not unconditionally force IPA, PKG, or archive creation.
  • Clarify that extension targets should update platform-created @(ApplicationArtifact) items when adding metadata, and only add new items for additional artifacts.
  • Limit platform metadata to PackageFormat, IsDirectory, PlatformName, and BundleIdentifier.
  • Update unit test assertions and in-repo build item/property/target docs for the new contract.
  • Use dotnet build ... -getTargetResult examples for querying GetApplicationArtifacts and Publish results from the command line.
  • Add direct item-query tests for IPA, PKG, app bundle, xcarchive outputs, extension metadata, publish-target metadata augmentation, overwritten GetApplicationArtifactsDependsOn behavior, and target dependency/condition-gate shape.

Validation

  • xmllint --noout msbuild/Xamarin.Shared/Xamarin.Shared.targets msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets dotnet/targets/Xamarin.Shared.Sdk.Publish.targets
  • git diff --check
  • make -C tests/dotnet/UnitTests build
  • Attempted filtered extension-order tests locally; execution is blocked by missing Xcode/runtime/workload setup in this checkout.

Add public MSBuild item groups for final MaciOS build and publish artifacts so custom targets and CI can consume app bundles, IPA files, PKG installers, and Xcode archives with metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Collapse MaciOS artifact and published artifact item groups into ApplePackageOutput, matching AndroidPackageOutput naming and reducing metadata to the package contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth changed the title Expose MaciOS artifact outputs Expose Apple package outputs Jun 16, 2026
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Redth and others added 3 commits June 16, 2026 17:11
Make ApplePackageOutput Signed reflect app code signing only, and expose separate PackageSigned metadata for .pkg installer package signing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop Signed and PackageSigned from ApplePackageOutput since Apple builds do not emit parallel signed and unsigned package outputs that need to be distinguished.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop AppBundlePath from ApplePackageOutput so the public contract focuses on the final artifact item identity and stable package metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Add direct GetApplePackageOutputs coverage using MSBuild item query output for IPA, PKG, app bundle, and xcarchive artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Rename the public artifact item group and query target to ApplicationArtifact and GetApplicationArtifacts so the surface can be shared across platforms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth changed the title Expose Apple package outputs Expose application artifacts Jun 16, 2026
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Make Build a mandatory GetApplicationArtifacts dependency instead of part of the overridable GetApplicationArtifactsDependsOn property. Extension targets still run after platform artifacts are produced, and tests now overwrite the property to prove Build cannot be removed while metadata augmentation still applies to GetApplicationArtifacts and Publish.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Update ApplicationArtifact target-result examples to use dotnet build with -getTargetResult for GetApplicationArtifacts and Publish.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8beec2d] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 8beec2d969368fb322fea3863327bd906ee3e310 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8beec2d] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 8beec2d969368fb322fea3863327bd906ee3e310 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 8beec2d969368fb322fea3863327bd906ee3e310 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8beec2d] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 8beec2d969368fb322fea3863327bd906ee3e310 [PR build]

@Redth

Redth commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Superseded by #25723, which uses the requested dev/redth/apple-artifacts-plan branch name.

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.

4 participants