diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml
index ed8a8f87..03953723 100644
--- a/.github/workflows/github-actions.yml
+++ b/.github/workflows/github-actions.yml
@@ -14,6 +14,11 @@ env:
SCL_AZURE_ARTIFACTS_API_KEY: ${{ secrets.SCL_AZURE_ARTIFACTS_API_KEY }}
SCL_GITHUB_NUGET_FEED_USERNAME: ${{ secrets.SCL_GITHUB_NUGET_FEED_USERNAME }}
+ BINDINGS_IOS___SDK_VERSION: "17.5"
+ BINDINGS_IOS___XCODE_IDE_DEV_PATH: "/Applications/Xcode_15.4.app/Contents/Developer"
+
+ BINDINGS_MACCATALYST___SDK_VERSION: "14.5"
+ BINDINGS_MACCATALYST___XCODE_IDE_DEV_PATH: "/Applications/Xcode_15.4.app/Contents/Developer"
on:
workflow_call: # so that other workflows can trigger this
@@ -57,20 +62,26 @@ jobs:
- name: '🏗 📦 Build, Pack & Announce New Release (if appropriate)'
shell: 'bash'
run: |
- cd "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts" \
- && \
- dotnet \
- msbuild \
- "Laerdal.Builder.targets" \
- -m:1 \
- -p:Should_Skip_MacCatalyst="false" \
- \
- -p:PackageOutputPath="${{env.BUILD_REPOSITORY_FOLDERPATH}}/Artifacts" \
- -p:Laerdal_Gradle_Path="/opt/homebrew/opt/gradle@7/bin/gradle" \
- -p:Laerdal_Source_Branch="${{env.LAERDAL_SOURCE_BRANCH}}" \
- -p:Laerdal_Repository_Path="${{env.LAERDAL_REPOSITORY_PATH}}" \
- -p:Laerdal_Github_Access_Token="${{env.SCL_GITHUB_ACCESS_TOKEN}}" \
- -p:Laerdal_Test_Results_Folderpath="${{env.BUILD_REPOSITORY_FOLDERPATH}}/TestResults"
+ cd "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts" \
+ && \
+ dotnet \
+ msbuild \
+ "Laerdal.Builder.targets" \
+ -m:1 \
+ -p:Should_Skip_MacCatalyst="false" \
+ \
+ -p:PackageOutputPath="${{env.BUILD_REPOSITORY_FOLDERPATH}}/Artifacts" \
+ -p:Laerdal_Gradle_Path="/opt/homebrew/opt/gradle@7/bin/gradle" \
+ -p:Laerdal_Source_Branch="${{env.LAERDAL_SOURCE_BRANCH}}" \
+ -p:Laerdal_Repository_Path="${{env.LAERDAL_REPOSITORY_PATH}}" \
+ -p:Laerdal_Github_Access_Token="${{env.SCL_GITHUB_ACCESS_TOKEN}}" \
+ -p:Laerdal_Test_Results_Folderpath="${{env.BUILD_REPOSITORY_FOLDERPATH}}/TestResults" \
+ \
+ -p:Laerdal_Bindings_iOS___Sdk_Version="${{env.BINDINGS_IOS___SDK_VERSION}}" \
+ -p:Laerdal_Bindings_iOS___Xcode_Ide_Dev_Path="${{env.BINDINGS_IOS___XCODE_IDE_DEV_PATH}}" \
+ \
+ -p:Laerdal_Bindings_MacCatalyst___Sdk_Version="${{env.BINDINGS_MACCATALYST___SDK_VERSION}}" \
+ -p:Laerdal_Bindings_MacCatalyst___Xcode_Ide_Dev_Path="${{env.BINDINGS_MACCATALYST___XCODE_IDE_DEV_PATH}}"
- name: '📡 Publish Test Results' # https://github.com/marketplace/actions/publish-test-results
uses: 'EnricoMi/publish-unit-test-result-action/macos@v2'
diff --git a/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj b/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj
index 6d183065..25e7e29c 100644
--- a/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj
+++ b/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj
@@ -55,10 +55,10 @@
@@ -193,6 +204,7 @@
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)GradlePath=$(Laerdal_Gradle_Path);
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)Configuration=$(Configuration);
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)PackageOutputPath=$(PackageOutputPath);
+ <_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)ContinuousIntegrationBuild=$(Is_CI_Build);
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)Should_Skip_MacCatalyst=$(Should_Skip_MacCatalyst);
@@ -209,14 +221,15 @@
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -229,10 +242,10 @@
Properties="Configuration=$(Configuration);Should_Skip_MacCatalyst=$(Should_Skip_MacCatalyst);"/>
- $(TestParameters) test 'Laerdal.McuMgr.Tests/Laerdal.McuMgr.Tests.csproj'
- $(TestParameters) --logger 'trx;LogFileName=TEST-Laerdal.McuMgr.Tests.xml'
- $(TestParameters) --verbosity '4'
- $(TestParameters) --configuration '$(Configuration)'
+ $(TestParameters) test 'Laerdal.McuMgr.Tests/Laerdal.McuMgr.Tests.csproj'
+ $(TestParameters) --logger 'trx;LogFileName=TEST-Laerdal.McuMgr.Tests.xml'
+ $(TestParameters) --verbosity '4'
+ $(TestParameters) --configuration '$(Configuration)'
$(TestParameters) --results-directory '$(Laerdal_Test_Results_Folderpath)'
@@ -266,19 +279,19 @@
Condition=" '$(Laerdal_Should_Tag_And_Release)' == 'True' "
AfterTargets="RunTests">
-
-
-
-
+
+
+
+
$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), `Laerdal.CreateNewReleaseInGithub.sh`))
- <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --log
- <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --git-branch '$(Laerdal_Source_Branch)'
- <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --tag-version '$(Laerdal_Version_Base)'
- <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --access-token '$(Laerdal_Github_Access_Token)'
- <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --repository-path '$(Laerdal_Repository_Path)'
+ <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --log
+ <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --git-branch '$(Laerdal_Source_Branch)'
+ <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --tag-version '$(Laerdal_Version_Base)'
+ <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --access-token '$(Laerdal_Github_Access_Token)'
+ <_Laerdal_Create_Github_Release_Script_Parameters>$(_Laerdal_Create_Github_Release_Script_Parameters) --repository-path '$(Laerdal_Repository_Path)'
diff --git a/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh b/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh
index bce73781..625f1c28 100644
--- a/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh
+++ b/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh
@@ -134,13 +134,13 @@ echo "** XCode Installations:"
ls -ld /Applications/Xcode* || exit 90
-sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
-declare exitCode=$?
-if [ $exitCode != 0 ]; then
- echo "##vso[task.logissue type=error]Failed to apply 'xcode-select'."
- exit 90
-fi
-echo
+#sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
+#declare exitCode=$?
+#if [ $exitCode != 0 ]; then
+# echo "##vso[task.logissue type=error]Failed to apply 'xcode-select'."
+# exit 90
+#fi
+#echo
echo
echo "** XCode SDKs:"
diff --git a/README.md b/README.md
index 86c3c215..4c46a07e 100644
--- a/README.md
+++ b/README.md
@@ -70,9 +70,9 @@ The following types of operations are supported on devices running on Nordic's n
## ✅ Nuget Platform-Support Matrix
-| Stack | Android | iOS | MacCatalyst (MacOS / iPad / iOS) | Windows / UWP (NetStandard2.0) |
-|-----------|---------------------------------------------------------------------------|-----------------------------------|-------------------------------------------------|----------------------------------------------------------------------------------|
-| DotNet 8+ | ✅ Min 5.0 / Recommended 11.0+ / Max 14.0
(api-levels: 20 / 30 / 34) | ✅ 11.0+
(sdk: iphoneos16.2) | ✅ 13.1+
(MacOS: 10.15+, iOS/iPadOS: 13+ ) | 🚧 (Much much later ...) |
+| Stack | Android | iOS | MacCatalyst (MacOS / iPad / iOS) | Windows / UWP (NetStandard2.0) |
+|-----------|---------------------------------------------------------------------------|--------------------------------------------------------------------------|--------------------------------------------------|----------------------------------------------------------------------------------|
+| DotNet 8+ | ✅ Min 5.0 / Recommended 11.0+ / Max 14.0
(api-levels: 20 / 30 / 34) | ✅ 17.0+ ( requires iPhoneXR or better )
( sdk: iphoneos-sdk 17.5 ) | ✅ 13.1+
( MacOS: 10.15+, iOS/iPadOS: 13+ ) | 🚧 (Much much later ...) |
## ❗️ Salient Points
@@ -88,6 +88,9 @@ to the device.**
- **At the time of this writing the generated ios-nugets are built based on the iphoneos16.2 sdk**
- **For the time being Nordics' Android/Java libs are compiled in a way that emits Java1.8 bytecode so as to keep the libraries backwards compatible with versions of Android all the way back to 7. Our Java "glue-code" under 'Laerdal.McuMgr.Bindings.Android.Native' is compiled in the same fashion.**
+
+- **To compile the iOS/MacCatalyst libs on localdev with their default settings you will need MacOS with XCode version 15.4 and iPhoneOS SDK 17.5.**
+ The reason McuMgr libs only support iPhones that can run iOS17 or better is simply because as of April 2024 all iOS and iPadOS apps submitted to the App Store must be built with a minimum of Xcode 15.x and the iOS 17.x SDK! The iOS 17.x SDK only supports iPhones/iPads that can run version 17.x of their respective OSes or better.
## 🚀 Using the Nugets in your Projects
@@ -96,7 +99,7 @@ Add the following Nuget packages.
Laerdal.McuMgr
Laerdal.McuMgr.Bindings.iOS (only add this to those projects of yours that target iOS)
Laerdal.McuMgr.Bindings.Android (only add this to those projects of yours that target Android)
- Laerdal.McuMgr.Bindings.MacCatalyst (WIP!) (only add this to those projects of yours that target MacCatalyst aka MacDesktop+iPad)
+ Laerdal.McuMgr.Bindings.MacCatalyst (only add this to those projects of yours that target MacCatalyst aka MacDesktop+iPad)
Laerdal.McuMgr.Bindings.NetStandard (WIP!) (only add this to those projects of yours that target Windows/UWP)
Make sure to always get the latest versions of the above packages.
@@ -213,13 +216,13 @@ private void FirmwareInstaller_StateChanged(object sender, StateChangedEventArgs
FirmwareInstallationStage = ea.NewState.ToString();
FirmwareInstallationOverallProgressPercentage = GetProgressMilestonePercentageForState(ea.NewState) ?? FirmwareInstallationOverallProgressPercentage;
- //00 if a firmware installation fails then we retry up to 10 times for a total of 11 times each
- // time we reattempt we start from scratch so the state will be reset back to being none again etc
+ //00 if a firmware installation fails then we retry up to 10 times each time we
+ // reattempt we start from scratch so the state will be reset back to being none again etc
}
private void FirmwareInstaller_FirmwareUploadProgressPercentageAndDataThroughputChanged(EventPattern eventPattern)
{
- var ea = eventPattern.EventArgs;
+ var ea = eventPattern.EventArgs; //00
FirmwareUploadAverageThroughputInKilobytes = ea.AverageThroughput;
if (FirmwareInstallationOverallProgressPercentage < 50) //10 hack
@@ -405,7 +408,7 @@ private void CleanupDeviceResetter()
Note:
The very first upload always feels slow and takes quite a bit of time to commence because Zephyr chipsets perform filesystem cleanup. There is nothing we can do about this.
- The culprit lies in issues plaguging littlefs
+ The culprit lies in issues plaguing littlefs
https://github.com/littlefs-project/littlefs/issues/797
https://github.com/littlefs-project/littlefs/issues/783
@@ -413,6 +416,7 @@ private void CleanupDeviceResetter()
```c#
+ private Dictionary _massFileUploadSelectedFileNamesAndTheirRawBytes; //set this appropriately
private async Task PickLocalFilesToMassUploadButtonClickedAsync()
{
try
@@ -449,10 +453,7 @@ private void CleanupDeviceResetter()
}
catch (Exception ex)
{
- App.DisplayAlert(
- title: "Error",
- message: $"Failed to pick local files!\r\n\r\n{ex}"
- );
+ App.DisplayAlert(title: "Error", message: $"Failed to pick local files!\r\n\r\n{ex}");
}
//00 in ios using openreadasync is the only way to get the raw bytes out of the file if we use the standard readers of C#
@@ -469,7 +470,7 @@ private void CleanupDeviceResetter()
try
{
- _massFileUploader = new FileUploader.FileUploader(/*Android or iOS device*/);
+ _massFileUploader = new FileUploader.FileUploader(/*Android device*/);
ToggleSubscriptionsOnMassFileUploaderEvents(subscribeNotUnsubscribe: true);
@@ -673,19 +674,17 @@ To build the nugets from source follow these instructions:
#### 1) Checkout
```bash
-git clone git@github.com:Laerdal-Medical/scl-mcumgr.git mcumgr.mst
+git clone git@github.com:Laerdal-Medical/Laerdal.McuMgr.git mcumgr.mst
# or for develop
-git clone git@github.com:Laerdal-Medical/scl-mcumgr.git --branch develop mcumgr.dev
+git clone git@github.com:Laerdal-Medical/Laerdal.McuMgr.git --branch develop mcumgr.dev
```
#### 2) Make sure you have .Net7 and .Net-Framework 4.8+ installed on your machine along with the workloads for maui, android and ios
```bash
# cd into the root folder of the repo
-declare dotnet_7_workload_version="7.0.101" \
-&& \
sudo dotnet \
workload \
install \
@@ -697,14 +696,20 @@ sudo dotnet \
maui-tizen \
maui-android \
maui-maccatalyst \
- --from-rollback-file=https://maui.blob.core.windows.net/metadata/rollbacks/${dotnet_7_workload_version}.json
&& \
cd "Laerdal.McuMgr.Bindings.iOS" \
&& \
sudo dotnet \
workload \
restore \
- --from-rollback-file=https://maui.blob.core.windows.net/metadata/rollbacks/${dotnet_7_workload_version}.json
+&& \
+cd - \
+&& \
+cd "Laerdal.McuMgr.Bindings.MacCatalyst" \
+&& \
+sudo dotnet \
+ workload \
+ restore \
&& \
cd - \
&& \
@@ -713,17 +718,10 @@ cd "Laerdal.McuMgr.Bindings.Android" \
sudo dotnet \
workload \
restore \
- --from-rollback-file=https://maui.blob.core.windows.net/metadata/rollbacks/${dotnet_7_workload_version}.json
+&& \
cd -
-# note#1 theoretically 'dotnet workload restore' on the root level should also do the trick but in practice it sometimes runs into problems
-#
-# note#2 microsoft encourages us to always update to and use the latest workloads in practice devs have complained that they've
-# run into headaches with this approach and would rather pin versions explicitly as shown above chances are you will have
-# one or more workloads forcibly updated to greater versions and if that's indeed the case then it's nearly impossible for
-# you to roll the workload versions back to the ones shown here most probably your build system will still work and you won't
-# run into trouble if you do you will either have to (a) reinstall .net7 from scratch or (b) use docker as your build system
-# to enforce strict workload-versioning on builds
+# note theoretically 'dotnet workload restore' on the root level should also do the trick but in practice it sometimes runs into problems
```
After running the above command running 'dotnet workload list' should print out something like this on Windows:
@@ -731,34 +729,31 @@ After running the above command running 'dotnet workload list' should print out
```bash
> dotnet workload list
-Installed Workload Id Manifest Version Installation Source
---------------------------------------------------------------------------------
-android 33.0.95/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-ios 16.4.7107/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-maui 7.0.96/7.0.100 SDK 7.0.400
-maui-android 7.0.96/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-maui-ios 7.0.96/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-maui-maccatalyst 7.0.96/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-maui-windows 7.0.96/7.0.100 SDK 7.0.400, VS 17.7.34202.233
-wasm-tools-net6 7.0.11/7.0.100 SDK 7.0.400
-maccatalyst 16.4.7107/7.0.100 VS 17.7.34202.233
+Installed Workload Id Manifest Version Installation Source
+---------------------------------------------------------------------------------
+android 34.0.113/8.0.100 SDK 8.0.300, VS 17.10.35027.167
+aspire 8.0.2/8.0.100 SDK 8.0.300, VS 17.10.35027.167
+ios 17.2.8078/8.0.100 SDK 8.0.300, VS 17.10.35027.167
+maccatalyst 17.2.8078/8.0.100 SDK 8.0.300, VS 17.10.35027.167
+maui 8.0.61/8.0.100 SDK 8.0.300
+maui-android 8.0.61/8.0.100 SDK 8.0.300
+maui-ios 8.0.61/8.0.100 SDK 8.0.300
+maui-maccatalyst 8.0.61/8.0.100 SDK 8.0.300
+maui-tizen 8.0.61/8.0.100 SDK 8.0.300
+maui-windows 8.0.61/8.0.100 SDK 8.0.300, VS 17.10.35027.167
```
#### 3) Make sure that Java17 is installed on your machine along with Gradle 7.6 (Gradle 8.x or above will NOT work!)
#### 4) Make sure you have installed Android SDKs starting from 31 up. You will need to install them using the Visual Studio installer. If you use Rider you will need to install them a second time using the Rider Android SDK manager too!
-#### 5) (optional) If you want to develop locally without pulling nugets from the feed make sure you add to your nuget sources the local filesystem-path to the folder 'Artifacts'
-
-Same goes for the testbed-ui app. If you want to build it locally you'll have to add to nuget sources the local file-system path 'Artifacts'.
-
-#### 6) Set MSBuild version to ver.17
+#### 5) Set MSBuild version to ver.17
-#### 7) On Mac make sure to install XCode 14.3+ (if you have multiple XCodes installed then make SDK 14.3+ the default by running 'sudo xcode-select -s /Applications/Xcode_XYZ.app/Contents/Developer').
+#### 6) On Mac make sure to install XCode 14.3+ (if you have multiple XCodes installed then make SDK 14.3+ the default by running 'sudo xcode-select --switch /Applications/Xcode_XYZ.app/Contents/Developer').
-#### 8) On Windows you have to also make sure you have enabled in the OS (registry) 'Long Path Support' otherwise the build will fail due to extremely long paths.
+#### 7) On Windows you will probably have to also enable in the OS (registry) 'Long Path Support' otherwise the build will most probably fail due to extremely long paths being involved during the build process.
-#### 9) Open 'Laerdal.McuMgr.sln' and build it.
+#### 8) Open 'Laerdal.McuMgr.sln' and build it.
You'll find the resulting nugets in the folder `Artifacts/`.
@@ -774,14 +769,14 @@ You'll find the resulting nugets in the folder `Artifacts/`.
# on macos *sh
dotnet \
msbuild \
- Laerdal.Builder.targets \
+ Laerdal.Builder.targets \
'"/m:1"' \
'"/p:Laerdal_Version_Full=1.0.x.0"'
# on windows powershell
& dotnet ^
msbuild ^
- Laerdal.Builder.targets ^
+ Laerdal.Builder.targets ^
'"/m:1"' ^
'"/p:Laerdal_Version_Full=1.0.x.0"'
@@ -817,6 +812,7 @@ the aspects being affected.
- [Nordic nRF Connect Device Manager](https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager)
- [Nordic Infocenter](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_welcome%2Fstruct%2Fwelcome.html)
+- [iPhone models and supported iOS versions](https://iosref.com/ios)
## Credits & Acknowledgements