Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 32 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,68 +12,67 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Use .NET 7 SDK
uses: actions/setup-dotnet@v4
- name: Use .NET 10 SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '7.0.x'
dotnet-version: '10.0.x'

- name: Install Java 17 JDK
uses: actions/setup-java@v5
with:
distribution: 'microsoft'
java-version: '17'

- name: Install MAUI workload
run: dotnet workload install maui

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install Android SDK Platform 33
run: |
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "platforms;android-33"


- name: Build Raygun4Maui.Platform
run: dotnet build Raygun4Maui.Platform/Raygun4Maui.Platform.csproj -c Release

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: package-platform
path: "./Raygun4Maui.Platform/bin/Release/*.nupkg"

build:
needs: build-platform
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use .NET 7 SDK
uses: actions/setup-dotnet@v4
uses: actions/checkout@v5

- name: Use .NET 10 SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '7.0.x'

- name: Install MAUI workload
run: dotnet workload install maui

- name: Install Java 11 JDK
uses: actions/setup-java@v4
dotnet-version: '10.0.x'

- name: Install Java 17 JDK
uses: actions/setup-java@v5
with:
distribution: 'microsoft'
java-version: '11'

java-version: '17'

- name: Install MAUI workload
run: dotnet workload install maui

- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: package-platform
path: ./packages

- name: Add local NuGet package source
run: dotnet nuget add source ${{ github.workspace }}/packages --name Local

- name: Build Raygun4Maui
run: dotnet build Raygun4Maui/Raygun4Maui.csproj -c Release

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: package
path: "./Raygun4Maui/bin/Release/*.nupkg"
7 changes: 7 additions & 0 deletions CHANGE-LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Full Change Log for Raygun4Maui package

### v3.0.0
- Migrate to .NET 10
- **Breaking:** iOS and MacCatalyst minimum platform raised to `15.0` (was `14.2` and `14.0` respectively)
- Centralize NuGet package versioning across `Raygun4Maui` and `Raygun4Maui.Platform`
- Both packages now release in lockstep; `Raygun4Maui.Platform` jumps from `1.1.0` to `3.0.0` to match
- **Breaking:** consumers with a version pin in the `[1.x, 2.x)` range on `Raygun4Maui.Platform` will need to update manually

### v2.4.0
- Generate dSYM for `RaygunNetworkMonitor`

Expand Down
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<!-- Shared version for all shipping NuGet packages -->
<Version>3.0.0</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotnet add package Raygun4Maui

Alternatively, you can specify a version tag to install a specific version of the package. See [Raygun4Maui NuGet Gallery page](https://nuget.org/packages/Raygun4Maui) for information on available versions.
```
dotnet add package Raygun4Maui --version 2.0.1
dotnet add package Raygun4Maui --version 3.0.0
```

### Step 2 - Add Raygun4Maui to your MauiApp builder
Expand Down
8 changes: 0 additions & 8 deletions Raygun.MAUI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raygun4Maui", "Raygun4Maui\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raygun4Maui.SampleApp", "Raygun4Maui.SampleApp\Raygun4Maui.SampleApp.csproj", "{005156B2-833B-406B-B5FD-F50593C4D28B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raygun4Maui.Test", "Raygun4Maui.Test\Raygun4Maui.Test.csproj", "{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{F2F79946-9672-4EEE-ADEF-A3A5DB23A752}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
Expand Down Expand Up @@ -40,12 +38,6 @@ Global
{005156B2-833B-406B-B5FD-F50593C4D28B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{005156B2-833B-406B-B5FD-F50593C4D28B}.Release|Any CPU.Build.0 = Release|Any CPU
{005156B2-833B-406B-B5FD-F50593C4D28B}.Release|Any CPU.Deploy.0 = Release|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Release|Any CPU.Build.0 = Release|Any CPU
{C4364C88-B953-45E4-B25E-FAE8F2FEDD4F}.Release|Any CPU.Deploy.0 = Release|Any CPU
{815DB4B5-DDE0-4627-8C44-DCCAE559133B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{815DB4B5-DDE0-4627-8C44-DCCAE559133B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{815DB4B5-DDE0-4627-8C44-DCCAE559133B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-android</TargetFramework>
<TargetFramework>net10.0-android</TargetFramework>
<SupportedOSPlatformVersion>24</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -15,8 +15,4 @@
<TransformFile Include="Transforms\EnumFields.xml" />
<TransformFile Include="Transforms\EnumMethods.xml" />
</ItemGroup>

<ItemGroup>
<Content Include="Additions\AboutAdditions.txt" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<ImplicitUsings>true</ImplicitUsings>
<IsBindingProject>true</IsBindingProject>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
24 changes: 13 additions & 11 deletions Raygun4Maui.Platform/Raygun4Maui.Platform.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>

<RootNamespace>Raygun4Maui.Platform</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- UseMaui pulls in the AndroidX deps needed to resource-link the bundled .aar.
No MAUI-typed code ships here, so the implicit Microsoft.Maui.Controls reference
would be a fictitious dependency. -->
<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>

<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.1.0</Version>
<PackageVersion>1.1.0</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Authors>Raygun</Authors>
<Company>Raygun</Company>
Expand All @@ -38,7 +40,7 @@
</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android'">
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-android'">
<ProjectReference Include="..\Raygun4Maui.Binding.NetworkMonitor.Android\Raygun4Maui.Binding.NetworkMonitor.Android.csproj">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<IncludeAssets>Raygun4Maui.Binding.NetworkMonitor.Android.dll</IncludeAssets>
Expand All @@ -47,19 +49,19 @@
<None Include="..\Raygun4Maui.Binding.NetworkMonitor.Android\Jars\networkmonitorlibrary.aar" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-ios' Or '$(TargetFramework)' == 'net7.0-maccatalyst'">
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-ios' Or '$(TargetFramework)' == 'net10.0-maccatalyst'">
<ProjectReference Include="..\Raygun4Maui.Binding.NetworkMonitor.iOS\Raygun4Maui.Binding.NetworkMonitor.iOS.csproj">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<IncludeAssets>Raygun4Maui.Binding.NetworkMonitor.iOS.dll</IncludeAssets>
</ProjectReference>

<None Include="..\Raygun4Maui.Binding.NetworkMonitor.iOS\bin\$(TargetFramework)\Raygun4Maui.Binding.NetworkMonitor.iOS.pdb" Pack="true" PackagePath="lib\$(TargetFramework)\" />
</ItemGroup>

<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
<BuildOutputInPackage Condition="'$(TargetFramework)' == 'net7.0-android'" Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->Replace('Raygun4Maui.Binding.NetworkMonitor.Android.dll', 'networkmonitorlibrary.aar'))" />
<BuildOutputInPackage Condition="'$(TargetFramework)' == 'net10.0-android'" Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->Replace('Raygun4Maui.Binding.NetworkMonitor.Android.dll', 'networkmonitorlibrary.aar'))" />
</ItemGroup>
</Target>

Expand All @@ -78,7 +80,7 @@
</None>
<None Include="Raygun4Maui.Platform.targets">
<Pack>True</Pack>
<PackagePath>buildTransitive\</PackagePath>
<PackagePath>buildTransitive\Raygun4Maui.Platform.targets</PackagePath>
</None>
</ItemGroup>

Expand Down
9 changes: 7 additions & 2 deletions Raygun4Maui.SampleApp/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
namespace Raygun4Maui.SampleApp;
#nullable enable

namespace Raygun4Maui.SampleApp;

public partial class App : Application
{
public App()
{
InitializeComponent();
}

MainPage = new AppShell();
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new AppShell());
}
}
4 changes: 2 additions & 2 deletions Raygun4Maui.SampleApp/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
/>

<Button
Text="Go to another page"
SemanticProperties.Hint="Test page load times"
Text="Open page-load &amp; network test"
SemanticProperties.Hint="Open the page-load and network test page"
Clicked="OnNavigateButtonClicked"
HorizontalOptions="Center"
/>
Expand Down
6 changes: 4 additions & 2 deletions Raygun4Maui.SampleApp/PageLoadTest.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
Spacing="20"
Padding="25,0"
VerticalOptions="Center">
<Label
Text="Tap the button below to record breadcrumbs, send a test exception, fire an HTTP GET (tracked by the native network monitor), and navigate back."
HorizontalTextAlignment="Center" />
<Button
Text="Go Back"
SemanticProperties.Hint="Test page load times"
Text="Run network &amp; crash test, then go back"
Clicked="OnNavigateButtonClicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:supportsRtl="true" />
<uses-sdk android:minSdkVersion="24"/>
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="36"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
60 changes: 40 additions & 20 deletions Raygun4Maui.SampleApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,58 @@

Sample application for testing the Raygun4Maui SDK.

## Build pre-release packages
## Test against a pre-release NuGet (instead of a ProjectReference)

### Add pre-release suffix to package versions e.g. `1.1.0-preview1`:
By default the sample app references `Raygun4Maui` via `<ProjectReference>` for fast
iteration. Before shipping a release, validate the SDK as it will actually be consumed
by customers — i.e. as a NuGet package. A `ProjectReference` skips the packaging step,
so it does not exercise:

- `Raygun4Maui.Platform/Raygun4Maui.Platform.csproj`
- `Raygun4Maui/Raygun4Maui.csproj`
- `GeneratePackageOnBuild` output (what ends up in the `.nupkg`)
- The `Raygun4Maui.Platform` package's `buildTransitive` targets
- Native asset packing (`networkmonitorlibrary.aar`, `RaygunNetworkMonitor.framework`)
- TFM-conditional `PackageReference`s the main project declares for each platform

### Add a local package source NuGet.config
To catch packaging regressions, switch the sample app to a `PackageReference` against a
locally-built pre-release `.nupkg`:

- Create `/Packages` folder in root directory
- Add `nuget.config` to root directory:
### 1. Bump the shared version to a pre-release

In `Directory.Build.props`, add a pre-release suffix, e.g. `3.0.1-pre.1`:

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Local Packages" value="./Packages" />
</packageSources>
</configuration>
<Version>3.0.1-pre.1</Version>
```

### Build and publish the pre-release packages
### 2. Build the pre-release packages

The repo's NuGet config already registers `./.nuget-local` as the user-level
`Raygun4MauiLocal` source (verify with `dotnet nuget list source`). Build the two
shipping packages and copy them into that folder:

```bash
Raygun4Maui.Platform % dotnet build -c Release
# Copy bin/Release/Raygun4Maui.Platform.x.x.x.nupkg to /Packages
dotnet build Raygun4Maui.Platform/Raygun4Maui.Platform.csproj -c Release
cp Raygun4Maui.Platform/bin/Release/Raygun4Maui.Platform.<version>.nupkg .nuget-local/

dotnet build Raygun4Maui/Raygun4Maui.csproj -c Release
cp Raygun4Maui/bin/Release/Raygun4Maui.<version>.nupkg .nuget-local/

Raygun4Maui % dotnet build -c Release
# Copy bin/Release/Raygun4Maui.x.x.x.nupkg to /Packages
# Force NuGet to re-read the local feed
dotnet nuget locals http-cache --clear
```

### 3. Swap the sample app's reference

In `Raygun4Maui.SampleApp.csproj`, replace the `<ProjectReference>` to
`Raygun4Maui.csproj` with a `<PackageReference>` at the pre-release version:

```xml
<PackageReference Include="Raygun4Maui" Version="3.0.1-pre.1" />
```

After testing, revert the version bump in `Directory.Build.props` and restore the
`<ProjectReference>` so day-to-day development still uses the in-tree project.

## Build and publish sample app for Xcode validation

List the available code-signing keys:
Expand All @@ -60,7 +80,7 @@ Use the full string in quotes as the `CodesignKey` in the .csproj:
Publish the `.xcarchive`:

```bash
dotnet publish -f:net7.0-ios -c Release -r ios-arm64 /p:ArchiveOnBuild=true /p:Platform=iPhone
dotnet publish -f:net10.0-ios -c Release -r ios-arm64 /p:ArchiveOnBuild=true /p:Platform=iPhone
```

Validate the `.xcarchive`:
Expand Down
Loading
Loading