10.8 C
Monday, June 10, 2024

flutter – flutter_facbook_auth is exhibiting -canOpenURL: failed for URL: “fbapi:/” – error: “The operation couldn’t be accomplished. (OSStatus error -10814.) for iOS

I’ve applied Login with Fb in my Flutter app utilizing
flutter_facebook_auth: ^7.0.0. It was working completely each for Android and iOS. Nevertheless, rapidly the error beneath is generated just for iOS in actual gadgets.

-canOpenURL: failed for URL: “fbapi:/” – error: “The operation couldn’t be accomplished. (OSStatus error -10814.)” false
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled
Exception: PlatformException(FAILED, The operation couldn’t be
accomplished. (com.fb.sdk.core error 8.), null, null)

That is the snippet from my pubspec.yaml

  sdk: '>=3.2.5 <4.0.0'

    sdk: flutter

  # so as to add fb login
  flutter_facebook_auth: ^7.0.0

Snippet from my information.plist


I’ve set the worldwide iOS platform to 12.0 in my Podfile.

# Uncomment this line to outline a world platform to your mission
platform :ios, '12.0'

Right here is how my AppDelegate.swift file appears to be like:

import UIKit
import Flutter

@objc class AppDelegate: FlutterAppDelegate {
  override func software(
    _ software: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return tremendous.software(software, didFinishLaunchingWithOptions: launchOptions)

That is the principle portion to deal with login with fb technique:

closing LoginResult loginResult = await FacebookAuth.occasion.login(
        //loginTracking: LoginTracking.restricted,
        //nonce: nonce,
    if (loginResult.standing == LoginStatus.success) {
      print('................SUCCESS'); // that is profitable
      // closing AccessToken accessToken = loginResult.accessToken!;
      closing userData = await FacebookAuth.occasion.getUserData();// <-- That is the place getting the Error.

Error from the log:

enter image description here

Please, kindly assist me remedy the problem. Thanks all prematurely.

Latest news
Related news


Please enter your comment!
Please enter your name here