Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU use in C# (Xamarin.iOS)?

Debug-iphoneos.zip

Is it possible to both include and use the DFU component, inside the nRF-Toolbox, in a C# project?

Please advise or provide links on how-to.

Parents Reply Children
  • Following the instructions...

    -Using the OTA DFU Library for Mac and iOS and following the Installation instructions for Obj-C projects

    ...the below results:

    Using CocoaPods to get the framework is successful, but when attempting to generate the header files (ApiDefinition.h and Structs.h) via this objective sharpie command:

    'sharpie bind -sdk iphoneos11.3 iOSDFULibrary.framework/headers/iOSDFULibrary-Swift.h'

    The binding works and it generates the files, but both of the generated files do not build. Both are littered with errors. 49326 to put a # on it.

    Could you please assist in generating the header files?

  • I would vote against using 3rd party solutions that is not officially released by Nordic, There are tons of porblems that would come with that:

    • It will not be thoroughly tested as we do internally.
    • It will most probably not be maintained, and is probably already outdated and will no longer work with our products.
    • This will also cause an extra dependency to get the latest features we release, as it has to be implemented by the third party
    • We will have another set of bugs that are related to DFU but are not caused by our own code, so it becomes impossible to reproduce and work with.

    Xamarin exports xCode projects, and that's where the libraries should be natively imported and buit, Swift or Obj-C will not matter and both will natively compile with the Xamarin project.

    This makes it easier for our users to update their projects with our latest releases and previews with a single update command and avoids the hassle of going through a third party :)

    Of course there will be some trickery involved to get things working smoothly, but that's how it is with multi-platform solutions

    but all in all the greater value would be to use our official libraries instead :)

Related