File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 with :
4646 dotnet-version : ' 10.0.x'
4747
48+ # Only maui-android is installable on Linux; maui-ios fails with
49+ # "Workload ID maui-ios isn't supported on this platform". The iOS TFM
50+ # is gated on macOS in OneSignalSDK.DotNet.csproj and demo.csproj, so
51+ # restore won't try to walk it here.
4852 - name : Install MAUI Android workload
4953 run : dotnet workload install maui-android
5054
@@ -103,8 +107,13 @@ jobs:
103107 with :
104108 dotnet-version : ' 10.0.x'
105109
106- - name : Install MAUI iOS workload
107- run : dotnet workload install maui-ios
110+ # Both workloads are required even though only the iOS TFM is built,
111+ # because NuGet restore walks every declared TargetFramework of the
112+ # multi-targeted OneSignalSDK.DotNet.csproj, and its android TFM
113+ # follows references into the android-only OneSignalSDK.DotNet.Android*
114+ # projects which need the android workload.
115+ - name : Install MAUI workloads
116+ run : dotnet workload install maui-android maui-ios
108117
109118 - name : Create demo .env
110119 working-directory : examples/demo
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFrameworks >net10.0;net10.0-android;net10.0-ios;netstandard2.0</TargetFrameworks >
3+ <!--
4+ iOS TFM only on macOS hosts. NuGet restore walks every declared
5+ TargetFramework of every transitively referenced project, and the iOS
6+ TFM pulls in OneSignalSDK.DotNet.iOS{,.Binding}.csproj which require
7+ the iOS workload. The iOS workload (`maui-ios`) cannot be installed on
8+ Linux ("Workload ID maui-ios isn't supported on this platform"), so
9+ consumers on Linux/Windows that only build the android TFM would
10+ otherwise fail at restore with NETSDK1178 looking for Microsoft.iOS.Sdk.
11+ NuGet packing for release runs on macOS, so the published package still
12+ ships all four TFMs.
13+ -->
14+ <TargetFrameworks >net10.0;net10.0-android;netstandard2.0</TargetFrameworks >
15+ <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >$(TargetFrameworks);net10.0-ios</TargetFrameworks >
416 <ImplicitUsings >enable</ImplicitUsings >
517 <Nullable >enable</Nullable >
618 <LangVersion >10.0</LangVersion >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFrameworks >net10.0-android;net10.0-ios</TargetFrameworks >
3+ <!--
4+ iOS targets only on macOS hosts. Linux/Windows CI runners (e.g. the
5+ Android build job) don't have the iOS workload installed, and NuGet
6+ restore evaluates every declared TargetFramework, which would otherwise
7+ pull in NotificationServiceExtension.csproj (net10.0-ios) and fail with
8+ NETSDK1178 looking for Microsoft.iOS.Sdk.
9+ -->
10+ <TargetFrameworks >net10.0-android</TargetFrameworks >
11+ <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >$(TargetFrameworks);net10.0-ios</TargetFrameworks >
412 <OutputType >Exe</OutputType >
513 <RootNamespace >OneSignalDemo</RootNamespace >
614 <UseMaui >true</UseMaui >
You can’t perform that action at this time.
0 commit comments