Skip to content

[StateReporting] Add bindings for the new StateReporting framework up to Xcode 27 Beta 3#26035

Open
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-StateReporting
Open

[StateReporting] Add bindings for the new StateReporting framework up to Xcode 27 Beta 3#26035
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-StateReporting

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

Bind the StateReporting framework introduced in Xcode 27 (iOS, tvOS, macOS and Mac Catalyst 27.0). It exposes a single Objective-C type, SRStateReporter, used to record a feature's or subsystem's state transitions and volatile metadata updates.

  • Add src/statereporting.cs binding SRStateReporter: the read-only Domain property, ReportTransition and ReportVolatileMetadataUpdate methods, and the FromDomain static factory. The native init is NS_UNAVAILABLE, so the type uses [DisableDefaultCtor].
  • Register the framework on all four platforms: add it to COMMON_FRAMEWORKS in frameworks.sources, regenerate generator-frameworks.g.cs, add the Frameworks.cs entries (Mac Catalyst inherits from iOS), and regenerate the *-defines-dotnet.rsp files.
  • Update tests/dotnet/UnitTests/ProjectTest.cs (expected frameworks linked with LinkMode=None) and regenerate the Documentation.KnownFailures.txt baseline for the new members.
  • Update the two untrimmed macOS CoreCLR app-size baselines (+10,240 bytes per RID from the added type).
  • Remove the now-resolved *-StateReporting.todo files.

Copilot-Session: a81895be-6d8d-4e92-b751-e88d304b350f

Bind the StateReporting framework introduced in Xcode 27 (iOS, tvOS,
macOS and Mac Catalyst 27.0). It exposes a single Objective-C type,
SRStateReporter, used to record a feature's or subsystem's state
transitions and volatile metadata updates.

* Add src/statereporting.cs binding SRStateReporter: the read-only
  Domain property, ReportTransition and ReportVolatileMetadataUpdate
  methods, and the FromDomain static factory. The native init is
  NS_UNAVAILABLE, so the type uses [DisableDefaultCtor].
* Register the framework on all four platforms: add it to
  COMMON_FRAMEWORKS in frameworks.sources, regenerate
  generator-frameworks.g.cs, add the Frameworks.cs entries (Mac
  Catalyst inherits from iOS), and regenerate the
  *-defines-dotnet.rsp files.
* Update tests/dotnet/UnitTests/ProjectTest.cs (expected frameworks
  linked with LinkMode=None) and regenerate the
  Documentation.KnownFailures.txt baseline for the new members.
* Update the two untrimmed macOS CoreCLR app-size baselines (+10,240
  bytes per RID from the added type).
* Remove the now-resolved *-StateReporting.todo files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a81895be-6d8d-4e92-b751-e88d304b350f
@dalexsoto dalexsoto added this to the xcode27 milestone Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 04:36
@dalexsoto dalexsoto requested a review from rolfbjarne as a code owner July 10, 2026 04:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class .NET bindings and build-system registration for Apple’s new StateReporting framework (Xcode 27 beta / platform version 27.0), including test and baseline updates so the new framework is recognized and validated across iOS, tvOS, macOS, and Mac Catalyst.

Changes:

  • Introduce StateReporting.SRStateReporter bindings (domain + transition/metadata reporting APIs) with 27.0 availability.
  • Register the StateReporting framework in build metadata and generated framework lists, and add HAS_STATEREPORTING defines.
  • Update unit-test expectations, documentation known-failures baseline, app-size baselines, and remove now-resolved xtro-sharpie .todo files.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/common/Frameworks.cs Registers StateReporting in per-platform framework availability lists (27.0).
src/frameworks.sources Adds StateReporting to COMMON_FRAMEWORKS so it’s included in framework processing.
src/build/dotnet/generator-frameworks.g.cs Regenerates generated framework registry to include StateReporting and HaveStateReporting.
src/statereporting.cs Adds binding definitions for SRStateReporter (27.0 across iOS/tvOS/macOS/MacCatalyst).
src/rsp/dotnet/ios-defines-dotnet.rsp Adds -d:HAS_STATEREPORTING compile define for iOS.
src/rsp/dotnet/tvos-defines-dotnet.rsp Adds -d:HAS_STATEREPORTING compile define for tvOS.
src/rsp/dotnet/macos-defines-dotnet.rsp Adds -d:HAS_STATEREPORTING compile define for macOS.
src/rsp/dotnet/maccatalyst-defines-dotnet.rsp Adds -d:HAS_STATEREPORTING compile define for Mac Catalyst.
tests/dotnet/UnitTests/ProjectTest.cs Updates expected framework link set to include StateReporting across relevant scenarios.
tests/cecil-tests/Documentation.KnownFailures.txt Updates documentation baseline for the new StateReporting type/members.
tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-size.txt Updates macOS untrimmed app-size baseline due to added API surface.
tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-TrimmableStatic-size.txt Updates macOS untrimmed app-size baseline (trimmable static variant).
tests/xtro-sharpie/api-annotations-dotnet/iOS-StateReporting.todo Removes resolved xtro-sharpie todo entries for iOS.
tests/xtro-sharpie/api-annotations-dotnet/tvOS-StateReporting.todo Removes resolved xtro-sharpie todo entries for tvOS.
tests/xtro-sharpie/api-annotations-dotnet/macOS-StateReporting.todo Removes resolved xtro-sharpie todo entries for macOS.
tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-StateReporting.todo Removes resolved xtro-sharpie todo entries for Mac Catalyst.

@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: 4b168246d0fe539cbdad79c4c1d553ca05814c08 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 Failed to compute test summaries on VSTS: test results 🔥

Failed to compute test summaries: Unable to understand the test result '# ⚠️ arm64 - Mac Golden Gate (27): Tests skipped, incorrect beta version' for test 'Tests on macOS Golden Gate (27)'.

Pipeline on Agent
Merge 4b16824 into 9f3bb3d

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 Failed to compute test summaries on VSTS: test results 🔥

Failed to compute test summaries: Unable to understand the test result '# ⚠️ arm64 - Mac Golden Gate (27): Tests skipped, incorrect beta version' for test 'Tests on macOS Golden Gate (27)'.

Pipeline on Agent
Merge 4b16824 into 9f3bb3d

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants