Skip to content

Commit

Permalink
fix: we no longer build monoandroid on windows due to a bug in xamari…
Browse files Browse the repository at this point in the history
  • Loading branch information
ksidirop-laerdal committed Oct 23, 2023
1 parent b2cc39c commit 23a2e03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Derived from https://github.com/xamcat/xamarin-binding-swift-framework/blob/master/Swift/Scripts/build.fat.sh#L3-L14

declare IOS_SDK_VERSION="${IOS_SDK_VERSION:-16.2}" # xcodebuild -showsdks
declare IOS_SDK_VERSION="${IOS_SDK_VERSION:-16.4}" # xcodebuild -showsdks

declare SWIFT_PROJECT_NAME="McuMgrBindingsiOS"
declare SWIFT_BUILD_PATH="./$SWIFT_PROJECT_NAME/build"
Expand Down
6 changes: 4 additions & 2 deletions Laerdal.McuMgr/Laerdal.McuMgr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

<!-- it only makes sense to build ios stuff under osx because xcodebuild is only available there -->
<TargetFrameworks>$(TargetFrameworks)netstandard2.0;</TargetFrameworks>

<TargetFrameworks>$(TargetFrameworks)monoandroid12.0;</TargetFrameworks>

<!-- notice that on windows the monoandroid build is disabled because the android bindings fail to be generated -->
<!-- due to a b.ug in Xamarin.Legacy.Sdk https://github.com/xamarin/Xamarin.Legacy.Sdk/issues/42 -->
<TargetFrameworks Condition=" '$(IsWindows)' != 'true' ">$(TargetFrameworks)monoandroid12.0;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net6.0-android;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net7.0-android;</TargetFrameworks>

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ _

_

Note#3 If you build on Windows the build system will work but the generated nugets *will only work on Android* but they will error out on iOS considering that the 'iOS part' of the build gets skipped in Windows.
Note#3 If you build on Windows the build system will work but the generated nugets *will only work on Android with MAUI apps* but they will error out on iOS considering that the 'iOS part'
of the build gets skipped in Windows.

To build the nugets from source follow these instructions:

Expand Down

0 comments on commit 23a2e03

Please sign in to comment.