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

Madhu Suragani 0 Reputation points
2023-11-07T10:55:35.3266667+00:00

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.

Issue:
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

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.