diff --git a/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj b/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj index 295755a..70b7de5 100644 --- a/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj +++ b/Laerdal.McuMgr.Bindings.Android/Laerdal.McuMgr.Bindings.Android.csproj @@ -62,10 +62,11 @@ true - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 + 1.0.1230.0 + + $(Version) + $(Version) + $(Version) $(PackageId) $(Authors) diff --git a/Laerdal.McuMgr.Bindings.MacCatalyst/Laerdal.McuMgr.Bindings.MacCatalyst.csproj b/Laerdal.McuMgr.Bindings.MacCatalyst/Laerdal.McuMgr.Bindings.MacCatalyst.csproj index 357a4ac..13c03a6 100644 --- a/Laerdal.McuMgr.Bindings.MacCatalyst/Laerdal.McuMgr.Bindings.MacCatalyst.csproj +++ b/Laerdal.McuMgr.Bindings.MacCatalyst/Laerdal.McuMgr.Bindings.MacCatalyst.csproj @@ -77,10 +77,11 @@ $(AllowedReferenceRelatedFileExtensions);.pdb - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 + 1.0.1230.0 + + $(Version) + $(Version) + $(Version) $(PackageId) McuMgr Bindings for MacCatalyst - MAUI ready diff --git a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS.xcodeproj/project.pbxproj b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS.xcodeproj/project.pbxproj index 63a1048..1244c0c 100644 --- a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS.xcodeproj/project.pbxproj +++ b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS.xcodeproj/project.pbxproj @@ -102,32 +102,32 @@ isa = PBXGroup; children = ( E769DC768A6D6F0D1CAC3C06 /* McuMgrBindingsiOS.h */, - E769D3E2D33EE281518619A7 /* IOSFirmwareInstaller.swift */, + E769D9D0270D6C4E5DF8E7CE /* EIOSFileUploaderState.swift */, + E769D3E9D67A36F06CF0EFB4 /* EIOSFileDownloaderState.swift */, + E769DD0EF706588EF75704AE /* EIOSDeviceResetterState.swift */, + E769D3130BA737A0C282D1DD /* EIOSFirmwareEraserState.swift */, + E769DCEDC8442691AF65E8F8 /* EIOSFirmwareInstallationState.swift */, + E769DC8A37490B096716C6B8 /* EIOSFirmwareInstallationMode.swift */, E769D1DEDAD5F89C361DF28C /* EIOSFirmwareInstallationVerdict.swift */, + E769DD92BBBF9A69EAF334F4 /* EIOSFirmwareInstallationFatalError.swift */, B04DC3642CD3C7810048B553 /* EIOSDeviceResetInitializationVerdict.swift */, + E769D797570DEED2DFC21B70 /* EIOSFileUploadingInitializationVerdict.swift */, + E769D8C352CB06D01D5C1EC7 /* EIOSFileDownloadingInitializationVerdict.swift */, B04DC3662CD3E1A20048B553 /* EIOSFirmwareErasureInitializationVerdict.swift */, - E769DC8A37490B096716C6B8 /* EIOSFirmwareInstallationMode.swift */, - E769DCEDC8442691AF65E8F8 /* EIOSFirmwareInstallationState.swift */, E769DB7090742CC7D6AFD01D /* InvalidFirmwareInstallationModeError.swift */, - E769D5CB3083656E75BFBC1A /* IOSFirmwareEraser.swift */, - E769D3130BA737A0C282D1DD /* EIOSFirmwareEraserState.swift */, + E769D417A16B8DCE9D59165A /* IOSFileUploader.swift */, E769DF03E263D02C508247AA /* IOSDeviceResetter.swift */, - E769DD0EF706588EF75704AE /* EIOSDeviceResetterState.swift */, + E769D9B93897FF4C9ABBAF94 /* IOSFileDownloader.swift */, + E769D5CB3083656E75BFBC1A /* IOSFirmwareEraser.swift */, + E769D3E2D33EE281518619A7 /* IOSFirmwareInstaller.swift */, + B0FF8AE82CCFF8E1004B39DE /* IOSListenerForFileUploader.swift */, E769D93618819B3E676FE0EA /* IOSListenerForDeviceResetter.swift */, E769DD6F60E601AFA283D34B /* IOSListenerForFirmwareEraser.swift */, + E769D19F5EC3404138BFDFF8 /* IOSListenerForFileDownloader.swift */, E769D13250C8CDA8CA70A8B7 /* IOSListenerForFirmwareInstaller.swift */, - E769DE03C73A46ADFF350E43 /* package.json */, - E769DC33E51C5D88437572EB /* DummyPlaceholder.swift */, - E769D9D0270D6C4E5DF8E7CE /* EIOSFileUploaderState.swift */, - E769D417A16B8DCE9D59165A /* IOSFileUploader.swift */, - E769D797570DEED2DFC21B70 /* EIOSFileUploadingInitializationVerdict.swift */, E769D8D446B42BE572E246D4 /* McuMgrExceptionHelpers.swift */, - E769D9B93897FF4C9ABBAF94 /* IOSFileDownloader.swift */, - E769D3E9D67A36F06CF0EFB4 /* EIOSFileDownloaderState.swift */, - E769D19F5EC3404138BFDFF8 /* IOSListenerForFileDownloader.swift */, - E769D8C352CB06D01D5C1EC7 /* EIOSFileDownloadingInitializationVerdict.swift */, - E769DD92BBBF9A69EAF334F4 /* EIOSFirmwareInstallationFatalError.swift */, - B0FF8AE82CCFF8E1004B39DE /* IOSListenerForFileUploader.swift */, + E769DC33E51C5D88437572EB /* DummyPlaceholder.swift */, + E769DE03C73A46ADFF350E43 /* package.json */, ); path = McuMgrBindingsiOS; sourceTree = ""; @@ -194,10 +194,9 @@ }; buildConfigurationList = E769D4DE04FEC8EDF4BFF2BF /* Build configuration list for PBXProject "McuMgrBindingsiOS" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, ); mainGroup = E769D5C169A2617737447E64; @@ -273,7 +272,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -365,7 +364,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileDownloader.swift b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileDownloader.swift index 76715b7..c20e2ce 100644 --- a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileDownloader.swift +++ b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileDownloader.swift @@ -192,7 +192,9 @@ public class IOSFileDownloader: NSObject { //@objc dont private func logMessageAdvertisement(_ message: String, _ category: String, _ level: String) { - _listener.logMessageAdvertisement(message, category, level, _remoteFilePathSanitized) + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.logMessageAdvertisement(message, category, level, self._remoteFilePathSanitized) + } } //@objc dont @@ -218,7 +220,9 @@ public class IOSFileDownloader: NSObject { _ progressPercentage: Int, _ averageThroughput: Float32 ) { - _listener.fileDownloadProgressPercentageAndDataThroughputChangedAdvertisement(progressPercentage, averageThroughput) + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.fileDownloadProgressPercentageAndDataThroughputChangedAdvertisement(progressPercentage, averageThroughput) + } } //@objc dont diff --git a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileUploader.swift b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileUploader.swift index 3b18cbc..9c089ac 100644 --- a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileUploader.swift +++ b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFileUploader.swift @@ -258,7 +258,9 @@ public class IOSFileUploader: NSObject { //@objc dont private func logMessageAdvertisement(_ message: String, _ category: String, _ level: String) { - _listener.logMessageAdvertisement(message, category, level, _remoteFilePathSanitized) + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.logMessageAdvertisement(message, category, level, self._remoteFilePathSanitized) + } } //@objc dont @@ -294,10 +296,12 @@ public class IOSFileUploader: NSObject { _ progressPercentage: Int, _ averageThroughput: Float32 ) { - _listener.fileUploadProgressPercentageAndDataThroughputChangedAdvertisement( - progressPercentage, - averageThroughput - ) + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.fileUploadProgressPercentageAndDataThroughputChangedAdvertisement( + progressPercentage, + averageThroughput + ) + } } private func setState(_ newState: EIOSFileUploaderState) { diff --git a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFirmwareInstaller.swift b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFirmwareInstaller.swift index 079f62e..2fe81bd 100644 --- a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFirmwareInstaller.swift +++ b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/McuMgrBindingsiOS/McuMgrBindingsiOS/IOSFirmwareInstaller.swift @@ -215,7 +215,9 @@ public class IOSFirmwareInstaller: NSObject { //@objc dont private func logMessageAdvertisement(_ message: String, _ category: String, _ level: String) { - _listener.logMessageAdvertisement(message, category, level); + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.logMessageAdvertisement(message, category, level) + } } //@objc dont @@ -245,7 +247,9 @@ public class IOSFirmwareInstaller: NSObject { _ progressPercentage: Int, _ averageThroughput: Float32 ) { - _listener.firmwareUploadProgressPercentageAndDataThroughputChangedAdvertisement(progressPercentage, averageThroughput) + DispatchQueue.global(qos: .background).async { //fire and forget to boost performance + self._listener.firmwareUploadProgressPercentageAndDataThroughputChangedAdvertisement(progressPercentage, averageThroughput) + } } private func setState(_ newState: EIOSFirmwareInstallationState) { @@ -371,9 +375,9 @@ extension IOSFirmwareInstaller: McuMgrLogDelegate { atLevel level: iOSMcuManagerLibrary.McuMgrLogLevel ) { logMessageAdvertisement( - msg, - category.rawValue, - level.name + msg, + category.rawValue, + level.name ) } } diff --git a/Laerdal.McuMgr.Bindings.NetStandard/Laerdal.McuMgr.Bindings.NetStandard.csproj b/Laerdal.McuMgr.Bindings.NetStandard/Laerdal.McuMgr.Bindings.NetStandard.csproj index 194d619..834bec9 100644 --- a/Laerdal.McuMgr.Bindings.NetStandard/Laerdal.McuMgr.Bindings.NetStandard.csproj +++ b/Laerdal.McuMgr.Bindings.NetStandard/Laerdal.McuMgr.Bindings.NetStandard.csproj @@ -37,10 +37,11 @@ $(AllowedReferenceRelatedFileExtensions);.pdb - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 + 1.0.1230.0 + + $(Version) + $(Version) + $(Version) $(PackageId) McuMgr C# Implementation (WIP) diff --git a/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj b/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj index dd828c8..52c3c4d 100644 --- a/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj +++ b/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj @@ -74,10 +74,11 @@ $(AllowedReferenceRelatedFileExtensions);.pdb - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 + 1.0.1230.0 + + $(Version) + $(Version) + $(Version) $(PackageId) McuMgr Bindings for iOS - MAUI ready diff --git a/Laerdal.McuMgr.slnx.DotSettings.user b/Laerdal.McuMgr.slnx.DotSettings.user index b93224e..8b08d2a 100644 --- a/Laerdal.McuMgr.slnx.DotSettings.user +++ b/Laerdal.McuMgr.slnx.DotSettings.user @@ -1,13 +1,16 @@  ForceIncluded + ForceIncluded ForceIncluded ForceIncluded - <SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> - <Solution /> + <SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> + <Solution /> </SessionState> True - True + + True + True True True diff --git a/Laerdal.McuMgr/Laerdal.McuMgr.csproj b/Laerdal.McuMgr/Laerdal.McuMgr.csproj index d5d27a7..2bcd0fd 100644 --- a/Laerdal.McuMgr/Laerdal.McuMgr.csproj +++ b/Laerdal.McuMgr/Laerdal.McuMgr.csproj @@ -7,16 +7,19 @@ true true - + + + + -force-dud $(TargetFrameworks)net8.0; - $(TargetFrameworks)net8.0-android; - $(TargetFrameworks)net8.0-ios11; - $(TargetFrameworks)net8.0-maccatalyst + $(TargetFrameworks)net8.0-android; + $(TargetFrameworks)net8.0-ios; + $(TargetFrameworks)net8.0-maccatalyst - true + true true true true @@ -73,10 +76,14 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 - 1.0.1208.0 + 1.0.1230.0 + + $(Version) + $(Version) + $(Version) + + + $(PackageVersion)$(PackageVersionPostfix) $(PackageId) $(Authors) @@ -169,21 +176,22 @@ - + - + - + + - + - + diff --git a/Laerdal.Scripts/Laerdal.Builder.targets b/Laerdal.Scripts/Laerdal.Builder.targets index 0e18d8c..6bc270a 100644 --- a/Laerdal.Scripts/Laerdal.Builder.targets +++ b/Laerdal.Scripts/Laerdal.Builder.targets @@ -165,9 +165,6 @@ <_replaceRegexInFile InputFile="$(ProjectFile)" Regex="<Version>.*?</Version>" ReplacementText="<Version>$(Version)</Version>"/> - <_replaceRegexInFile InputFile="$(ProjectFile)" Regex="<FileVersion>.*?</FileVersion>" ReplacementText="<FileVersion>$(Version)</FileVersion>"/> - <_replaceRegexInFile InputFile="$(ProjectFile)" Regex="<PackageVersion>.*?</PackageVersion>" ReplacementText="<PackageVersion>$(Version)</PackageVersion>"/> - <_replaceRegexInFile InputFile="$(ProjectFile)" Regex="<AssemblyVersion>.*?</AssemblyVersion>" ReplacementText="<AssemblyVersion>$(Version)</AssemblyVersion>"/> <_replaceRegexInFile InputFile="$(ProjectFile)" @@ -254,7 +251,13 @@ + Properties="$(_Laerdal_Build_Parameters);Laerdal_Bindings_Android___DotnetTargetPlatformVersion=$(Laerdal_Bindings_Android___DotnetTargetPlatformVersion);Laerdal_Bindings_iOS___DotnetTargetPlatformVersion=$(Laerdal_Bindings_iOS___DotnetTargetPlatformVersion);Laerdal_Bindings_MacCatalyst___DotnetTargetPlatformVersion=$(Laerdal_Bindings_MacCatalyst___DotnetTargetPlatformVersion);SourceRoot=$(Laerdal_RootDirectory_Folderpath)/Laerdal.McuMgr/;" + Targets="Restore;Rebuild"/> + + + diff --git a/README.md b/README.md index 4bcc1fe..74455de 100644 --- a/README.md +++ b/README.md @@ -806,6 +806,15 @@ dotnet \ But the same family of events in Android is never triggered from the underlying McuMgr libs of Nordic (it's only triggered when we want to emit certain warnings ourselves) so logging in Android is very limited. +- Trying to use the iOS/Android flavours of this library in desktop-simulator for iOS/Android will probably result in compilation errors. If you want to perform general purpose + UI-testing on your desktop using such simulators you need to tweak your nuget references to use the `-force-dud` nuget of `Laerdal.McuMgr` like so: + +```xml + + $(NoWarn);NU1605 + +``` + ## Contributing We welcome contributions to this project in the form of bug reports, feature requests, and pull requests.