Singleton instance is always null of the Third party library(Swift)

Madhu Suragani 0 Reputation points

We would want to use a third party library(NokeMobileLibrary) which is built using Swift to unlock BLE enabled smart lock called Noke using MAUI mobile application from iPhone.

Below are the tasks completed.

  1. We were trying to use this library to unlock Noke lock from iPhone using .NET MAUI project.
    Below steps are completed:
  2. used @objc to all the swift classes and methods
  3. Build the xcode project for iphoneos and iphonesimulator
  4. Used objective sharpie tool to generate ApiDefinition and StructsAndEnums
  5. Used ApiDefinition , StructsAndEnums in xamarin ios binding project along with NokeMobileFramework.framework as native reference, Fixed the compilation error and Build the binding project
  6. Used the generated DLL from binding project.

Singleton Shared instance of NokeDeviceManager is null. We may need this instance created to access all Noke Device methods to interact Noke Device.

If someone who had successfully integrated this library in any of the .NET projects Kindly help

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,157 questions
0 comments No comments
{count} votes