Skip to content

Add .NET MAUI sample app#367

Open
niemyjski wants to merge 4 commits into
mainfrom
feature/maui-sample
Open

Add .NET MAUI sample app#367
niemyjski wants to merge 4 commits into
mainfrom
feature/maui-sample

Conversation

@niemyjski

@niemyjski niemyjski commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Add samples/Exceptionless.SampleMaui, a .NET MAUI sample that uses the core Exceptionless client via MAUI DI.
  • Configure app-data folder storage, file logging, default MAUI tags/data, app version, and IncludePrivateInformation = false.
  • Resolve the local development server per platform: http://localhost:7110 for iOS, Mac Catalyst, and Windows; http://10.0.2.2:7110 for the Android emulator; and an environment override for physical devices or custom servers.
  • Add sample UI actions for project configuration refresh, handled exceptions, warning logs, feature usage, and explicit queue flushing.
  • Add a command-line autorun dogfood path that refreshes configuration, queues the sample events, flushes the queue, and can write a small result file.
  • Add platform bootstrap files/manifests/assets plus README instructions for workloads, launching Mac Catalyst, and API key/server URL overrides.

Fixes #366

Validation

  • dotnet build samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj -f net10.0-maccatalyst -p:ValidateXcodeVersion=false
  • dotnet build samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj -c Release -f net10.0-maccatalyst -p:ValidateXcodeVersion=false -p:RuntimeIdentifier=maccatalyst-arm64
  • dotnet build samples/Exceptionless.SampleMaui/Exceptionless.SampleMaui.csproj -c Release -f net10.0-ios -p:ValidateXcodeVersion=false -p:RuntimeIdentifier=iossimulator-arm64
    • The iOS simulator Release output includes AOT artifacts such as Exceptionless.aotdata.arm64 and Exceptionless.SampleMaui.aotdata.arm64.
  • Launched the Mac Catalyst Release app locally with EXCEPTIONLESS_SAMPLE_AUTORUN=true, EXCEPTIONLESS_API_KEY=TEST_API_KEY, and EXCEPTIONLESS_SERVER_URL=http://127.0.0.1:18181.
    • A local collector stub received GET /api/v2/projects/config?v=0.
    • The stub then received POST /api/v2/events containing usage (MauiSample.TrackFeature, reference id 8c2dac9145584824bc67f0466131bc94), log (Exceptionless.SampleMaui.MainPage, reference id f788aa00d1b84271999a34ea3f902fa4), and error (reference id 5bfd1b7325b94d2e96b45c6f73a84bb6) events.
  • Launched the Mac Catalyst app with EXCEPTIONLESS_SAMPLE_AUTORUN=true and no API key or server URL overrides against the real local Exceptionless AppHost.
    • GET http://localhost:7110/api/v2/about returned 200.
    • The client started with ServerUrl=http://localhost:7110 and logged Sent 3 events to "http://localhost:7110".
    • GET /api/v2/events?sort=-date&limit=10 showed the submitted MAUI events: usage (MauiSample.TrackFeature, reference id a47a106724d0476285935e8f36548f4a), log (Exceptionless.SampleMaui.MainPage, reference id 3a032ef3f2044e01a19b1818809ebdea), and error (Exceptionless MAUI sample handled exception., reference id 2b11511070f942fb9cf48e42376ef6cf).
  • dotnet build Exceptionless.Net.NonWindows.slnx
  • dotnet test Exceptionless.Net.NonWindows.slnx --no-build

Local MAUI Toolchain Notes

  • Ordinary net10.0-maccatalyst builds are blocked on this machine because the installed .NET Mac Catalyst pack 26.5.10284 requires Xcode 26.5, while this machine has Xcode 26.6. The local validation above uses -p:ValidateXcodeVersion=false for that reason.
  • net10.0-android builds are blocked on this machine by missing Android SDK/JDK configuration: XA5300: The Android SDK directory could not be found.
  • Launching the Mac Catalyst app emits a non-blocking UIKit background-fetch warning from the MAUI app host, but config refresh and event submission still complete.

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".

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

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 Allow local HTTP traffic on iOS

When running the iOS target with the sample's default http://localhost:7110 server URL, requests are subject to ATS and will fail before events/config can reach the local Exceptionless server because this plist never opts into local clear-text traffic. The .NET MAUI local-web-services guidance calls out adding NSAppTransportSecurity with NSAllowsLocalNetworking for iOS local HTTP, while Android is already configured separately in its manifest: https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/local-web-services?view=net-maui-10.0

Useful? React with 👍 / 👎.

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