Skip to content

Commit

Permalink
feat (Laerdal.Dfu.Bindings.iOS.csproj): add support for MacCatalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
ksidirop-laerdal committed Nov 12, 2024
1 parent 2efda09 commit e4965a6
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Laerdal.Dfu.Bindings.iOS/Laerdal.Dfu.Bindings.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0-ios</TargetFramework>
<IsBindingProject>true</IsBindingProject>

<TargetFrameworks>$(TargetFrameworks)net8.0-ios;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net8.0-maccatalyst</TargetFrameworks>

<IsOSX Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' ">true</IsOSX>

<IsNet8IOS Condition=" $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' ">true</IsNet8IOS>
<IsNet8MacCatalyst Condition=" $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' ">true</IsNet8MacCatalyst>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -41,10 +46,16 @@

<!-- ==================== TARGET PLATFORM VERSION ======================= -->
<PropertyGroup>
<!-- ios you will need specific workloads though dotnet workload install maui -/-version 8.0.402 -->
<TargetPlatformVersion>17.0</TargetPlatformVersion>
<TargetPlatformMinVersion>14.2</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<!-- you will need to be specific when it comes to workloads -> dotnet workload install maui -/-version 8.0.402 -->

<!-- #1 these properties must be kept in sync between this file and laerdal.mcumgr.bindings.[android|ios|maccatalyst].csproj -->
<!-- #2 even though this is library is pure csharp we still have to specify the target-plaform-version for each target because -->
<!-- if we dont dont the build system throws a tantrum from oct 2024 onwards -->
<TargetPlatformVersion Condition=" '$(IsNet8IOS)' == 'true' ">17.0</TargetPlatformVersion>
<SupportedOSPlatformVersion Condition=" '$(IsNet8IOS)' == 'true' ">11.0</SupportedOSPlatformVersion>

<TargetPlatformVersion Condition=" '$(IsNet8MacCatalyst)' == 'true' ">17.0</TargetPlatformVersion>
<SupportedOSPlatformVersion Condition=" '$(IsNet8MacCatalyst)' == 'true' ">13.1</SupportedOSPlatformVersion>
</PropertyGroup>

<Import Project="Laerdal.targets"/>
Expand Down

0 comments on commit e4965a6

Please sign in to comment.