Skip to content

Commit

Permalink
Merge pull request #37 from Laerdal/develop
Browse files Browse the repository at this point in the history
develop -> master
  • Loading branch information
ksidirop-laerdal authored Jan 16, 2025
2 parents a986a01 + 3fc7576 commit 96d3867
Show file tree
Hide file tree
Showing 18 changed files with 2,134 additions and 328 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ env:
SCL_DEPENDENCY_TRACKER_SERVER_URL: ${{ secrets.SCL_DEPENDENCY_TRACKER_SERVER_URL }}
SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY }}

DOTNET_TARGET_WORKLOAD_VERSION: "8.0.402" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported
DOTNET_TARGET_WORKLOAD_VERSION: "8.0.405" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported

BINDINGS_IOS___SDK_VERSION: "18.1" # for xcodebuild
BINDINGS_IOS___XCODE_IDE_DEV_PATH: "/Applications/Xcode_16.1.app/Contents/Developer" # for xcodebuild
BINDINGS_IOS___DOTNET_TARGET_PLATFORM_VERSION: "17.0" # for the csproj file
BINDINGS_IOS___DOTNET_TARGET_PLATFORM_VERSION: "18.0" # for the csproj file

BINDINGS_MACCATALYST___SDK_VERSION: "15.1" # for xcodebuild
BINDINGS_MACCATALYST___XCODE_IDE_DEV_PATH: "/Applications/Xcode_16.1.app/Contents/Developer" # for xcodebuild
BINDINGS_MACCATALYST___DOTNET_TARGET_PLATFORM_VERSION: "17.0" # for the csproj file
BINDINGS_MACCATALYST___DOTNET_TARGET_PLATFORM_VERSION: "18.0" # for the csproj file


on:
Expand Down
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,16 @@ ASALocalRun/
.localhistory/

Output/
Laerdal.Dfu.Bindings.iOS/Carthage/
Laerdal.Dfu.Bindings.iOS/Sharpie/
Laerdal.Dfu.Bindings.iOS/Frameworks/
Laerdal.Dfu.Native/
Laerdal.Dfu.Bindings.*/Carthage/
Laerdal.Dfu.Bindings.*/Sharpie/
Laerdal.Dfu.Bindings.*/Frameworks/


*.binlog
*.csproj.xml

# we dont want to allow any local nuget.configs to be checked in as they can cause issues with the build and/or contain hardcoded API keys with write access to the
# nuget feed and this is something we definitely want to avoid at all costs for obvious reasons such nuget.config files should be remain local to each dev machine
[Nn][Uu][Gg][Ee][Tt].[Cc][Oo][Nn][Ff][Ii][Gg]

414 changes: 414 additions & 0 deletions Laerdal.Dfu.Bindings.MacCatalyst/ApiDefinition.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectRootPath>$(MSBuildThisFileDirectory)</ProjectRootPath>

<Laerdal_Package_Name>Laerdal.Dfu.Bindings.MacCatalyst</Laerdal_Package_Name>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0-maccatalyst</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<_CompileAndGenerateFatLibs_Config>$(_CompileAndGenerateFatLibs_Config) SUPPORTS_MACCATALYST='YES'</_CompileAndGenerateFatLibs_Config>
<_CompileAndGenerateFatLibs_Config>$(_CompileAndGenerateFatLibs_Config) XCODEBUILD_TARGET_SDK='macosx'</_CompileAndGenerateFatLibs_Config>
<_CompileAndGenerateFatLibs_Config>$(_CompileAndGenerateFatLibs_Config) XCODEBUILD_TARGET_ARCH='arm64'</_CompileAndGenerateFatLibs_Config>

<_CompileAndGenerateFatLibs_Config>$(_CompileAndGenerateFatLibs_Config) XCODE_IDE_DEV_PATH='$(Laerdal_Bindings_MacCatalyst___Xcode_Ide_Dev_Path)'</_CompileAndGenerateFatLibs_Config>
<_CompileAndGenerateFatLibs_Config>$(_CompileAndGenerateFatLibs_Config) XCODEBUILD_TARGET_SDK_VERSION='$(Laerdal_Bindings_MacCatalyst___Sdk_Version)'</_CompileAndGenerateFatLibs_Config>
</PropertyGroup>

<Import Project="../Laerdal.Scripts/Laerdal.targets"/>
</Project>
112 changes: 112 additions & 0 deletions Laerdal.Dfu.Bindings.MacCatalyst/StructsAndEnums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
using ObjCRuntime;

namespace Laerdal.Dfu.Bindings.iOS
{
[Native]
public enum DFUError : long
{
RemoteLegacyDFUSuccess = 1,
RemoteLegacyDFUInvalidState = 2,
RemoteLegacyDFUNotSupported = 3,
RemoteLegacyDFUDataExceedsLimit = 4,
RemoteLegacyDFUCrcError = 5,
RemoteLegacyDFUOperationFailed = 6,
RemoteSecureDFUSuccess = 11,
RemoteSecureDFUOpCodeNotSupported = 12,
RemoteSecureDFUInvalidParameter = 13,
RemoteSecureDFUInsufficientResources = 14,
RemoteSecureDFUInvalidObject = 15,
RemoteSecureDFUSignatureMismatch = 16,
RemoteSecureDFUUnsupportedType = 17,
RemoteSecureDFUOperationNotPermitted = 18,
RemoteSecureDFUOperationFailed = 20,
RemoteSecureDFUExtendedError = 21,
RemoteExtendedErrorWrongCommandFormat = 22,
RemoteExtendedErrorUnknownCommand = 23,
RemoteExtendedErrorInitCommandInvalid = 24,
RemoteExtendedErrorFwVersionFailure = 25,
RemoteExtendedErrorHwVersionFailure = 26,
RemoteExtendedErrorSdVersionFailure = 27,
RemoteExtendedErrorSignatureMissing = 28,
RemoteExtendedErrorWrongHashType = 29,
RemoteExtendedErrorHashFailed = 30,
RemoteExtendedErrorWrongSignatureType = 31,
RemoteExtendedErrorVerificationFailed = 32,
RemoteExtendedErrorInsufficientSpace = 33,
RemoteExperimentalButtonlessDFUSuccess = 9001,
RemoteExperimentalButtonlessDFUOpCodeNotSupported = 9002,
RemoteExperimentalButtonlessDFUOperationFailed = 9004,
RemoteButtonlessDFUSuccess = 91,
RemoteButtonlessDFUOpCodeNotSupported = 92,
RemoteButtonlessDFUOperationFailed = 94,
RemoteButtonlessDFUInvalidAdvertisementName = 95,
RemoteButtonlessDFUBusy = 96,
RemoteButtonlessDFUNotBonded = 97,
FileNotSpecified = 101,
FileInvalid = 102,
ExtendedInitPacketRequired = 103,
InitPacketRequired = 104,
FailedToConnect = 201,
DeviceDisconnected = 202,
BluetoothDisabled = 203,
ServiceDiscoveryFailed = 301,
DeviceNotSupported = 302,
ReadingVersionFailed = 303,
EnablingControlPointFailed = 304,
WritingCharacteristicFailed = 305,
ReceivingNotificationFailed = 306,
UnsupportedResponse = 307,
BytesLost = 308,
CrcError = 309,
InvalidInternalState = 500
}

public enum DFUFirmwareType : byte
{
Softdevice = 1,
Bootloader = 2,
Application = 4,
SoftdeviceBootloader = 3,
SoftdeviceBootloaderApplication = 7
}

[Native]
public enum DFUState : long
{
Connecting = 0,
Starting = 1,
EnablingDfuMode = 2,
Uploading = 3,
Validating = 4,
Disconnecting = 5,
Completed = 6,
Aborted = 7
}

[Native]
public enum DFUUuidType : long
{
LegacyService = 0,
LegacyControlPoint = 1,
LegacyPacket = 2,
LegacyVersion = 3,
SecureService = 4,
SecureControl = 5,
SecurePacket = 6,
ButtonlessService = 7,
ButtonlessCharacteristic = 8,
ButtonlessWithoutBondSharing = 9,
ButtonlessWithBondSharing = 10
}

[Native]
public enum LogLevel : long
{
Debug = 0,
Verbose = 1,
Info = 5,
Application = 10,
Warning = 15,
Error = 20
}
}
16 changes: 16 additions & 0 deletions Laerdal.Dfu.Bindings.iOS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Misc", "_Misc", "{DB8D9BFF
Laerdal.Scripts\Laerdal.Builder.targets = Laerdal.Scripts\Laerdal.Builder.targets
.gitignore = .gitignore
Laerdal.Scripts\Laerdal.GenerateSignAndUploadSbom.sh = Laerdal.Scripts\Laerdal.GenerateSignAndUploadSbom.sh
Laerdal.Scripts\Laerdal.Mac.CompileAndGenerateFatLibs.sh = Laerdal.Scripts\Laerdal.Mac.CompileAndGenerateFatLibs.sh
Laerdal.Scripts\Laerdal.targets = Laerdal.Scripts\Laerdal.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Laerdal.Dfu.Bindings.MacCatalyst", "Laerdal.Dfu.Bindings.MacCatalyst\Laerdal.Dfu.Bindings.MacCatalyst.csproj", "{5B622943-B0B5-4076-A01A-90B35085783C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Laerdal.Dfu.Bindings.iOSSimulator.Arm64", "Laerdal.Dfu.Bindings.iOSSimulator.Arm64\Laerdal.Dfu.Bindings.iOSSimulator.Arm64.csproj", "{BF8CFFF3-F461-4E71-A52F-DFD90CAD7E3C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Laerdal.Dfu.Bindings.iOSSimulator.x64", "Laerdal.Dfu.Bindings.iOSSimulator.x64\Laerdal.Dfu.Bindings.iOSSimulator.x64.csproj", "{E017DE68-51C5-4982-8C7C-DEF7ACF04094}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A9FE8625-F74F-431E-BED5-A50AAD22FB88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9FE8625-F74F-431E-BED5-A50AAD22FB88}.Release|Any CPU.Build.0 = Release|Any CPU
{5B622943-B0B5-4076-A01A-90B35085783C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B622943-B0B5-4076-A01A-90B35085783C}.Release|Any CPU.Build.0 = Release|Any CPU
{A2283FE2-CF20-4824-AFD5-357F30D1FE4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2283FE2-CF20-4824-AFD5-357F30D1FE4B}.Release|Any CPU.Build.0 = Release|Any CPU
{BF8CFFF3-F461-4E71-A52F-DFD90CAD7E3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF8CFFF3-F461-4E71-A52F-DFD90CAD7E3C}.Release|Any CPU.Build.0 = Release|Any CPU
{E017DE68-51C5-4982-8C7C-DEF7ACF04094}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E017DE68-51C5-4982-8C7C-DEF7ACF04094}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit 96d3867

Please sign in to comment.