Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	Laerdal.Dfu/Laerdal.Dfu.csproj
  • Loading branch information
ksidirop-laerdal committed Sep 4, 2024
2 parents 8d89443 + 301facc commit e343963
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 68 deletions.
15 changes: 7 additions & 8 deletions Laerdal.Dfu/Laerdal.Dfu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- todo add support for maccatalyst -->
<TargetFrameworks>net7.0-ios;net7.0-android;netstandard2.1;</TargetFrameworks>
<TargetFrameworks>net8.0-ios;net8.0-android;netstandard2.1;</TargetFrameworks>

<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -48,14 +48,13 @@

<Import Project="Laerdal.targets"/>

<!-- =========================== PACKAGES ============================ -->

<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'ios' ">
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.13.0.43928"/>
<!-- =========================== PACKAGES ============================ -->
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">
<PackageReference Include="Laerdal.Dfu.Bindings.Android" Version="2.3.0.43888"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android'">
<PackageReference Include="Laerdal.Dfu.Bindings.Android" Version="9.0.35" />
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'ios' ">
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.13.0.43933"/>
</ItemGroup>
<!-- =========================== PACKAGES ============================ -->

Expand Down
4 changes: 3 additions & 1 deletion Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ dotnet \
install \
maui \
ios \
android
android \
maui-ios \
maui-android
# --from-rollback-file=https://maui.blob.core.windows.net/metadata/rollbacks/${dotnet_8_workload_version}.json # we need to install additional packages manually
declare exitCode=$?
if [ $exitCode != 0 ]; then
Expand Down
61 changes: 3 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,15 @@ The native iOS Pod library is located here: https://github.com/NordicSemiconduct

[![NuGet Badge](https://buildstats.info/nuget/Laerdal.Dfu?includePreReleases=true)](https://www.nuget.org/packages/Laerdal.Dfu/)

## Requirements

You'll need :

- **MacOS**
- with **XCode**
- with **Xamarin.iOS**
- with **gradle**
- with **Xamarin.Android**
- [with **ObjectiveSharpie**] (optional)

```bash
brew cask install objectivesharpie
```

[More about Objective Sharpie](https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/objective-sharpie/get-started)

## Steps to build on Local-Dev
## Building Locally

### 1) Checkout

```bash
git clone https://github.com/Laerdal/Laerdal.Dfu.git
```

### 2) Comment out in the .csproj files any mention of Git-related properties

### 3) Set the MSBuild version to 15.0 in Rider's settings (MSBuild 17.0+ won't build)

### 4) Run build script

There are 2 sources for the iOS package : via building the release code or using the CocoaPods.

To build the nuget via building the source code, run :
### 2) Build

```bash
./build.sh -v
dotnet msbuild Laerdal.Scripts/Laerdal.Builder.targets /m:1 /p:Laerdal_Version=9.0.x.0 /p:Laerdal_Github_Access_Token=<place your github access token here - its needed by carthage>
```

You'll find the nuget in `Laerdal.Dfu.Output/`

### Known issues

- [**Invalid Swift support when submitted to the Apple AppStore**](https://github.com/Laerdal/Laerdal.Dfu.iOS/issues/3) |

Fix : https://github.com/Laerdal/Laerdal.Dfu.iOS/issues/3#issuecomment-783298581 |

```shell
#!/usr/bin/env sh
xcode_lib_path="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos"
app_path=$1
app_name=<insert app name>
libs=("$app_path/Products/Applications/$app_name/Frameworks/"*.dylib)

for i in "${libs[@]}"
do
cp "$xcode_lib_path/$(basename "$i")" "$app_path/SwiftSupport/iphoneos/"
cp "$xcode_lib_path/$(basename "$i")" "$app_path/Products/Applications/$app_name/Frameworks/"
done
```

> -- Thanks [@OliverFlecke](https://github.com/OliverFlecke)
- [**ObjCRuntime.RuntimeException: Can't register the class XXX when the dynamic registrar has been linked away"**](https://github.com/Laerdal/Laerdal.Dfu.iOS/issues/1)

Fix : You might need to add "--optimize=-remove-dynamic-registrar" to your apps mtouch args.

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.0",
"version": "8.0.0",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down

0 comments on commit e343963

Please sign in to comment.