Open HassanMehdi17 opened 4 years ago
Went through this myself. The most important thing with this is that if you try to build or run your app in a simulator, then an underlying dependency is not available. The Microsoftblink.Forms.iOS.MicroblinkScannerFactoryImplementation class calls on a method from the Microblink SDK called SharedInstance. SharedInstance is what is actually returning null. And this will happen even if all you are attempting to do is just BUILD the code toward any target besides a physical device.
Hi @HassanMehdi17 and @stephajn
The issue here could be connected with git lfs
(Git Large File Storage) and downloading larger files when cloning the project.
Make sure that you have git lfs
installed since some larger files will not be downloaded if it is not installed.
You can also check if larger files have been checked out with the git lfs pull
command.
Also to note, make sure that you've entered a valid license key in the project and initialized the license key method before entering the scanning screen.
Regards, Milan
@mparadina
That's what it was for me. Doing a git lfs pull after getting the initial repository solved the problem beautifully.
On my PC, using Visual Studio, I can successfully compile the Droid project and deploy it onto my physical device. If I want to compile the iOS application and deploy it to my iPhone, I actually have to do all of that from Visual Studio for Mac on my iMac for it to work. Trying to use the Xamarin tooling on my Windows PC in Visual Studio 2019 to build it and deploy it to my physical device seems to result in the native library not being deployed along with the Xamarin based code.
Not sure if there is a project setting or a specific package setting that has to be put in place, but it definitely seems to only work if I build it using Visual Studio for Mac on a macOS machine.
im testing on IOS.
my constructor:
public MainPage() { InitializeComponent();
the microblinkFactory is getting initialized to null.
this is my appdelegate.cs for my .ios project