Skip to content

Add .NET MAUI sample app - #367

Merged
niemyjski merged 9 commits into
mainfrom
feature/maui-sample
Oct 6, 2026
Merged

niemyjski merged 9 commits into
mainfrom
feature/maui-sample

Conversation

@niemyjski

@niemyjski niemyjski commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Adds a MAUI sample using ExceptionlessClient.Default through DI, with persistent queuing, private information collection disabled, configuration refresh, and three event actions. Rebased onto main, updated the MAUI dependency, fixed Apple scene startup and iOS local HTTP, and replaced the placeholder artwork with Exceptionless green branding.

Fixes #366.

Validation: Release build (zero warnings), 310 tests passed / 18 existing skips; Final Mac Catalyst UI and configuration/event delivery passed. All six existing Linux/macOS/Windows checks and license/cla passed on final revision 9e61fd7.

Local Apple validation required an Xcode-version override (pack expects 26.6; installed 27.0). Dogfood used a loopback test collector at localhost:18181; ingestion by a real Exceptionless server remains unverified. Android/Windows native runtime remains untested. Merging is blocked by required maintainer approval.

Verification and implementation details
  • Rebased the four original sample commits onto main (2054b80) without changing their patches.
  • Hosting and Logging project files are unchanged from main; the sample needs only the core client.
  • Uses the SDK hosted-service defaults unless a server URL is explicitly supplied. Removed the embedded fixture API key and local/emulator addresses. The SDK reads Exceptionless__ApiKey, Exceptionless__ServerUrl, and Exceptionless__Enabled during Startup(), without a custom environment-variable adapter. Invalid configuration or a disabled client disables page actions and writes status=failed during autorun. Event service methods use SDK APIs directly, without repeated validation exceptions.
  • Autorun result writes use awaited File.WriteAllLinesAsync while retaining best-effort handling of sandbox file errors.
  • Enlarged text and button heights, allowed status/server text to wrap, and constrained the desktop column width. Visually checked wide and narrow Mac windows and exercised all five buttons.
  • Final Mac autorun refreshed configuration and delivered all three event types with reference IDs matching the async result file.
  • Retained the existing library/test CI workflows. The MAUI sample is intentionally validated locally; no additional sample workflow or custom target-selection property is introduced.
  • An Android arm64 Release compile passed during validation. Windows MAUI runtime and compilation remain unverified.
  • Native Release builds completed with zero warnings/errors and trimming enabled; the iOS simulator build includes AOT artifacts.
  • Added a shared Apple privacy manifest with the three runtime/BCL required-reason entries from Microsoft’s MAUI guidance. The runtime API manifest was validated at the root of the iOS Release bundle; that build had zero warnings/errors. The final shared manifest was validated as a byte-for-byte copy in the Mac Catalyst bundle’s Contents/Resources, with zero warnings/errors in the final Mac build.
  • The SDK attaches a persistent installation ID even when private information is disabled. The manifest therefore declares Device ID plus linked crash/other diagnostic data for app functionality and product interactions for analytics, without advertising tracking, following Apple’s data-use guidance. Final plist/type checks passed. The shared-resource update was not followed by another iOS native rebuild; App Store archive/upload validation remains untested.
  • Explicitly wired Mac Catalyst signing to its entitlements file, following Microsoft’s guidance. Inspected the final code signature: app sandbox and network-client entitlements are present, with the SDK’s JIT entitlement retained. A fresh launch of that signed bundle refreshed configuration and delivered all three event types with reference IDs matching its async result file.
  • Rechecked the simplified setup against the repository integration guidance: default client through DI, configuration before startup, folder storage in app data, explicit privacy setting, and async queue processing. Native Mac launches verified standard SDK environment configuration with all three received event types, missing-key action disabling, and disabled-client behavior.
  • Inspected the packaged Apple manifests for scene configuration and iOS NSAllowsLocalNetworking. The scene delegates retain the sample's single-window behavior.
  • Mac Catalyst autorun and manual UI checks received SampleMaui.ConfigValue=dogfood-ok; error, log, and usage events contained the expected platform/sample tags and unique reference IDs. Repeated log/usage events arrived after the client's normal duplicate-check delay, now explained in the README.
  • iOS validation preceded the final shared-client/layout edits, which were revalidated on Mac Catalyst. iOS autorun against http://localhost:18181 refreshed configuration and delivered error, log, and usage events with IDs matching the result file.
  • The macOS push run initially failed three existing file-log tests; a fresh rerun passed without code changes. The paired macOS PR run also passed.
  • NuGet's transitive vulnerability scan reported no known vulnerabilities in the library/test graph or the MAUI sample graph.
  • Replaced the generic blue sample icon with a built-in Codex imagegen white Exceptionless mark on the brand's green background. The same mark is used on the green splash screen; page accents, buttons, and the Windows tile use the green palette. The layered icon retains adaptive-icon padding. The foreground PNG is stored in Resources/AppIcon/appiconfg.png.

Image generation prompt (the repository's build/exceptionless-icon.png was the identity reference):

Use case: logo-brand. Asset type: production .NET MAUI app icon foreground for Exceptionless. Input image: the repository's existing Exceptionless logo is the identity reference. Generate a refined, crisp white Exceptionless E symbol that closely preserves the reference's distinctive geometry: three broad horizontal bars connected by a soft curved left stem, slight forward lean, generous internal negative space. Make it polished and premium with very subtle dimensional enamel bevels and a restrained soft highlight, not a bulky extruded object. Straight-on orthographic view, bold recognizable silhouette, readable at 32 pixels. Single mark centered on a genuinely transparent square canvas, occupying 70% of width and height with generous safe padding. This will be composited over the established Exceptionless green icon background by MAUI. No tile, no opaque backdrop, no extra words, no border, no badge, no other symbols, no mockup, no watermark. Preserve the shape and white identity; improve contour precision and finish.

  • Mac Catalyst emitted the MAUI host's background-fetch warning; configuration and event submission completed successfully.

Reproduce the local Apple build on a supported toolchain:

dotnet workload install maui --version 10.0.401
dotnet build samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj -c Release -f net10.0-maccatalyst -r maccatalyst-arm64
dotnet build Exceptionless.Net.NonWindows.slnx -c Release
dotnet test Exceptionless.Net.NonWindows.slnx -c Release --no-build

Use net10.0-ios and iossimulator-arm64 for iOS. Autorun requires EXCEPTIONLESS_SAMPLE_AUTORUN=true, a reachable Exceptionless__ServerUrl, and Exceptionless__ApiKey set to a test project key; set EXCEPTIONLESS_SAMPLE_AUTORUN_RESULT_PATH to a writable path. Verify collector receipts independently of the runner's status=completed, because client network failures are logged internally.

Copilot AI review requested due to automatic review settings June 30, 2026 03:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5346aed430

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/MainPage.cs

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 a new .NET MAUI sample application (samples/Exceptionless.SampleMaui) demonstrating how to use the core Exceptionless client from a MAUI app via DI, including local file-based queue storage and file logging.

Changes:

  • Introduces a MAUI sample app with a simple UI for sending handled exceptions, warning logs, feature usage, and flushing the queue.
  • Adds platform-specific bootstrap files/manifests (Android/iOS/Mac Catalyst/Windows) plus app icon and splash resources.
  • Registers the new sample project in Exceptionless.Net.slnx under the Samples folder.

Reviewed changes

Copilot reviewed 20 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
samples/Exceptionless.SampleMaui/Resources/Splash/splash.svg Adds MAUI splash screen vector asset.
samples/Exceptionless.SampleMaui/Resources/AppIcon/appiconfg.svg Adds MAUI app icon foreground vector.
samples/Exceptionless.SampleMaui/Resources/AppIcon/appicon.svg Adds MAUI app icon background/vector.
samples/Exceptionless.SampleMaui/README.md Documents configuration and how to run/build the MAUI sample.
samples/Exceptionless.SampleMaui/Platforms/Windows/Package.appxmanifest Adds Windows packaging manifest for the MAUI sample.
samples/Exceptionless.SampleMaui/Platforms/Windows/App.xaml.cs Adds WinUI app bootstrap for MAUI.
samples/Exceptionless.SampleMaui/Platforms/Windows/App.xaml Adds WinUI XAML application definition.
samples/Exceptionless.SampleMaui/Platforms/Windows/app.manifest Adds Windows runtime manifest settings (DPI/long paths).
samples/Exceptionless.SampleMaui/Platforms/MacCatalyst/Program.cs Adds Mac Catalyst entry point.
samples/Exceptionless.SampleMaui/Platforms/MacCatalyst/Info.plist Adds Mac Catalyst app metadata.
samples/Exceptionless.SampleMaui/Platforms/MacCatalyst/Entitlements.plist Adds Mac Catalyst entitlements (sandbox + network).
samples/Exceptionless.SampleMaui/Platforms/MacCatalyst/AppDelegate.cs Adds Mac Catalyst app delegate for MAUI.
samples/Exceptionless.SampleMaui/Platforms/iOS/Program.cs Adds iOS entry point.
samples/Exceptionless.SampleMaui/Platforms/iOS/Info.plist Adds iOS app metadata.
samples/Exceptionless.SampleMaui/Platforms/iOS/AppDelegate.cs Adds iOS app delegate for MAUI.
samples/Exceptionless.SampleMaui/Platforms/Android/MainApplication.cs Adds Android application bootstrap for MAUI.
samples/Exceptionless.SampleMaui/Platforms/Android/MainActivity.cs Adds Android main activity bootstrap for MAUI.
samples/Exceptionless.SampleMaui/Platforms/Android/AndroidManifest.xml Adds Android manifest (internet/network permissions).
samples/Exceptionless.SampleMaui/MauiProgram.cs Configures ExceptionlessClient (DI, storage, file logging, default tags/data).
samples/Exceptionless.SampleMaui/MainPage.cs Implements the sample UI and event submission actions.
samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj Adds the MAUI project file with multi-targeting and project reference to core client.
samples/Exceptionless.SampleMaui/App.cs Adds MAUI Application with queue processing on sleep.
Exceptionless.Net.slnx Registers the new MAUI sample in the main solution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread samples/Exceptionless.SampleMaui/MainPage.cs Outdated
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs
Comment thread samples/Exceptionless.SampleMaui/MauiProgram.cs Fixed
Comment thread samples/Exceptionless.SampleMaui/MauiProgram.cs Fixed
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs Fixed
Comment thread samples/Exceptionless.SampleMaui/MainPage.cs Fixed
Comment thread samples/Exceptionless.SampleMaui/SampleDogfoodRunner.cs Fixed
Comment thread samples/Exceptionless.SampleMaui/SampleDogfoodRunner.cs Fixed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b43a40dbe1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/SampleEventService.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c285036943

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/Platforms/iOS/Info.plist
@niemyjski
niemyjski force-pushed the feature/maui-sample branch from c285036 to 27eeb15 Compare October 6, 2026 03:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T04:24:21.401435Z 9e61fd7 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@niemyjski
niemyjski force-pushed the feature/maui-sample branch from 70dcb28 to f5133b8 Compare October 6, 2026 03:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5133b8d05

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Exceptionless.Net.slnx
@niemyjski
niemyjski force-pushed the feature/maui-sample branch from f5133b8 to 643a626 Compare October 6, 2026 04:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 643a626f06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b6df2d003

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/Resources/PrivacyInfo.xcprivacy
@niemyjski
niemyjski force-pushed the feature/maui-sample branch from 00e5a21 to 35625ad Compare October 6, 2026 04:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52c3b11d3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj
Comment thread samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj Outdated
Comment thread samples/Exceptionless.SampleMaui/Resources/PrivacyInfo.xcprivacy

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e61fd7c77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +31 to +32
await WriteResultAsync(resultPath,
"status=completed",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify delivery before reporting autorun completion

When the API key is syntactically valid but unauthorized, or the server returns another submission error, DefaultEventQueue.ProcessAsync logs the failed response and returns normally—sometimes after deleting the batch—so the preceding flush does not indicate successful delivery. This then writes status=completed and event reference IDs even though no event reached Exceptionless, giving dogfood automation a false-positive result; report successful completion only after observing a successful submission response, or label the result as an attempted queue processing instead.

Useful? React with 👍 / 👎.

@niemyjski
niemyjski merged commit 903acbb into main Oct 6, 2026
7 checks passed
@niemyjski
niemyjski deleted the feature/maui-sample branch October 6, 2026 04:25
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.

Create .NET Maui Sample

2 participants