Closed potatojoayo closed 2 months ago
Solved by using facebook_auth_desktop package.
final LoginResult loginResult = await _facebookAuth.login();
if (defaultTargetPlatform == TargetPlatform.macOS) {
_plugin = FacebookAuthDesktopPlugin();
_plugin.webAndDesktopInitialize(
appId: '3823348807877566',
cookie: true,
xfbml: true,
version: 'v18.0');
loginResult = await _plugin.login();
} else {
loginResult = await _facebookAuth.login();
}
Now that the exception has gone, another bug was found.
2024-02-14 18:40:07.604 plain_todo[12118:3781912] *** Assertion failure in -[facebook_auth_desktop.WebViewController dismissViewController:], NSViewController.m:863
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'dismissViewController:: Error: maybe this view controller was not presented?'
I'll open it as a new issue.
What version are you using?
flutter_facebook_auth:6.0.4
What OS and version are you using to local deploy your application?
macOS 14.2.1
What platforms are you seeing the problem on?
macOS
pubspec.yaml
Describe the Bug
source code
Android
Works fine with the same code.
iOS
Works fine with the same code.
macOS
Following exception was thrown.
I've followed the documentation (https://facebook.meedu.app/docs/6.x.x/macos) throughly and did triple check.
The following snippet was added to
macos/runner/info.plist
Below is Xcode setting.
Also, facebook login setting was set.
Finally, I initialized the sdk with the following code.
Expected Behavior
Not throw any exception in macOS just like Android and iOS.
To Reproduce
Github repository
https://github.com/Plain-Potato/Plain-Auth
Relevant log output
Info.plist (iOS)
Podfile (iOS)
No response
AndroidManifest.xml
No response
MainActivity.java
No response
MainActivity.kt
No response
index.html
No response
Info.plist (macOS)