darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
197 stars 138 forks source link

iOS FacebookAuth #145

Closed jjsebastianfuertes closed 3 years ago

jjsebastianfuertes commented 3 years ago

Describe the bug I get this response after trying to compile

../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-3.4.0/lib/flutter_facebook_auth.dart:8:7: Error: The non-abstract class 'FacebookAuth' is missing implementations for these members:
 - FacebookAuthPlatform.autoLogAppEventsEnabled
 - FacebookAuthPlatform.isAutoLogAppEventsEnabled

Environment Add your flutter doctor -v

Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cc385b4b8 (2 days ago) • 2021-09-07 23:01:49 -0700
Engine • revision f0826da7ef
Tools • Dart 2.14.0

Add your pubspec.yaml

 flutter_facebook_auth: 3.4.0

Add your AppDelegate.swift

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    if #available(iOS 10.0, *) {
      UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
    }
    if #available(iOS 14.0, *){
        if(!UserDefaults.standard.bool(forKey: "Notification")) {
            UIApplication.shared.cancelAllLocalNotifications()
            UserDefaults.standard.set(true, forKey: "Notification")
        }
    }

    let content = UNMutableNotificationContent() // notification content object
    content.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue:"notification.aiff"))

    GMSServices.provideAPIKey("________________")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
darwin-morocho commented 3 years ago

update to the lastest version of flutter_facebook_auth if the problem persists add your complete pubspec.yaml file

jjsebastianfuertes commented 3 years ago

I downgrade to 3.4.0 because of SDK conflicts with flutter_facebook_sdk

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flutter_statusbarcolor_ns: ^0.3.0-nullsafety
  provider: ^6.0.0
  devicelocale: ^0.4.2
  intl: ^0.17.0
  google_maps_flutter: 2.0.8
  photo_view: ^0.12.0
  uuid: ^3.0.4
  loading_overlay: ^0.3.0
  pagination_view: ^2.0.0
  path_provider: ^2.0.2
  dio: ^4.0.0
  device_info: ^2.0.2
  flutter_secure_storage: ^4.2.1
  dotted_border: ^2.0.0+1
  location: ^4.3.0
  geocode: ^1.0.1
  url_launcher: ^6.0.9
  cached_network_image: ^3.1.0
  xml2json: ^5.3.1
  maps_toolkit: ^2.0.0
  flutter_svg: ^0.22.0
  google_place: ^0.4.3
  sign_in_with_apple: ^3.0.0
  flutter_typeahead: ^3.2.0
  carousel_slider: ^4.0.0
  flutter_html: ^2.1.1
  cupertino_icons: ^1.0.3
  flutter_barcode_scanner: ^2.0.0
  flutter_facebook_auth: 3.4.0
  flutter_facebook_sdk: ^1.0.0
  image_picker: ^0.8.3+3
  share_plus: ^2.1.4
  flare_splash_screen: ^4.0.0
  pull_to_refresh: ^2.0.0
  transparent_image: ^2.0.0
  firebase_core: ^1.6.0
  firebase_messaging: ^10.0.6
  firebase_crashlytics: ^2.2.1
  firebase_analytics: ^8.3.1
  firebase_dynamic_links: ^2.0.9
  appsflyer_sdk: ^6.3.5
  code_scanner: ^1.0.0
  package_info_plus: ^1.0.6
  date_utils: ^0.2.0
  app_tracking_transparency: ^2.0.1
  flutter_local_notifications: ^8.1.1+1
  oktoast: ^3.1.1
  advance_pdf_viewer: ^2.0.0
  sqflite: ^2.0.0+4
  in_app_update: ^2.0.0
  upgrader: ^3.5.1
  story_view: ^0.13.1
  connectivity: ^3.0.6
  shimmer: ^2.0.0
  fancy_shimmer_image: ^2.0.0+2
  google_maps_webservice: ^0.0.20-nullsafety.5
  string_similarity: ^2.0.0
  fk_user_agent: ^2.0.1
  device_apps: ^2.1.1
  envify: ^2.0.2
  flutter_countdown_timer: ^4.1.0
  fl_chart: ^0.40.0
  card_scanner: ^1.0.1-prerelease
  flutter_hms_gms_checker: ^1.0.0
  huawei_push: ^5.1.1+301
  huawei_analytics: ^5.2.0+301
  huawei_map: ^5.0.3+302
  huawei_location: ^5.1.0+301
  huawei_scan: ^1.3.0+300
  huawei_ml: ^2.0.5+301
  permission_handler: ^8.1.4+2
  sendbird_sdk: ^3.1.2
  camera: ^0.9.1+1
  path: ^1.8.0
  in_app_review: ^2.0.2
  google_sign_in: ^5.0.7
  flutter_gen: ^3.1.1
  google_fonts: ^2.1.0
  expansion_widget: ^0.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.9.2
  envify_generator: ^2.0.0
  build_runner: ^2.1.1

flutter_icons:
  android: "ic_logo"
  ios: true
  image_path: "assets/img/logo_app.png"

flutter:
  generate: true
  uses-material-design: true
  #To add images & language configuration
  assets:
    - assets/img/
    - assets/svg/
    - assets/gif/
    - assets/audio/

flutter_intl:
  enabled: true
  main_locale: en
  class_name: AppLanguage
darwin-morocho commented 3 years ago

I got it. so I am closing this because is not a bug of this plugin. flutter_facebook_sdk needs to update the facebook sdk on iOS