Closed IcySnex closed 3 months ago
Hey, I think you have to update the csproj to net6.0 or 7.0, it might help you, because for now it's just netstandard2.0.
Also check for Bouncy Castle library or other libraries as well.
I don't have macos nor ios, so can't help you.
P.s: i accidently closed this, sorry.
Normally netstandard2.0 packages support all net versions and frameworks including net6.0 and net7.0 and I mean it works on Windows and Android with MAUI. I think MAUI on iOS and macOS currently doesn't support on of the used dependencies by the wrapper. I can't really debug the wrapper to find the exact issue because I am using macOS in a virtual machine and the performance is AWFUL. Im just using it to build .ipa files for iOS.
I really wanted to try this new MAUI thing everyone is hyped about for the app I'm currently developing but I have already switched to Xamarin because of this issue and Xamarin is fine.
Also Two-Factor Authorization Login is not correctly working. It keeps saying "Check security code" even tho it is correct. Tested with 2FA-App and 2FA-SmS options enabled on the Instagram Account. I used the sample project on Windows.
I have the same issue with Macos and iOS, does anybody found any workaround?
I did not find any workaround. Only thing you can do is switch API wrappers (which is very hard since there arent really any updated usable wrappers) or use Xamarin instead of MAUI.
I've:
Issue category
Language
Usage
Operating System
Debug logs
macOS and iOS: 2023-04-01 14:10:27.507 MyApp[1867:31285] Exception: System.NullReferenceException: Object reference not set to an instance of an object. at InstagramApiSharp.API.InstaApi.LoginAsync(Boolean isNewLogin) 2023-04-01 14:10:27.509 MyApp[1867:31285] Stacktrace: at InstagramApiSharp.API.InstaApi.LoginAsync(Boolean isNewLogin)
Describe your issue
This API wrapper is not correctly working on macOS or iOS while using MAUI. Whenever trying to login with an Instagram account the API throws an exception: "Object reference not set to an instance of an object". Tested the same application on Xamarin and it works. This is the code I am currently using:
As a quick note, this code on MAUI is fully working on Windows and Android. I dont know if this is a problem with my project setup but I am just using an empty template.