darwin-morocho / flutter-facebook-auth

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

Pod install fails on FBSDKMarketingKit (deprecated) #398

Closed jeyremy closed 6 months ago

jeyremy commented 6 months ago

What version are you using?

flutter_facebook_auth: ^6.2.0

What OS and version are you using to local deploy your application?

Mac OS 14.2.1

What platforms are you seeing the problem on?

iOS

pubspec.yaml

name: app
description: a new project

version: 1.0.0+1

environment:
  sdk: '>=3.0.0 <4.0.0'

dependencies:
  flutter:
    sdk: flutter

  #miscellaneous
  cupertino_icons: ^1.0.5
  animated_splash_screen: ^1.3.0
  page_transition: ^2.0.9
  intl: ^0.18.1
  intl_utils: ^2.8.3
  flutter_svg: ^2.0.7
  flutter_markdown: ^0.6.17+1
  logger: ^2.0.1
  equatable: ^2.0.5
  # open_mail_app: ^0.4.5
  persistent_bottom_nav_bar_v2: ^4.2.8
  # transparent_image: ^2.0.1
  carousel_slider: ^4.2.1
  cached_network_image: ^3.2.3
  overlay_tooltip: ^0.2.3
  extended_tabs: ^4.1.0
  image_picker: ^1.0.4
  dropdown_button2: ^2.3.9
  image_editor_plus: ^1.0.3
  freezed_annotation: ^2.4.1
  image: ^4.0.17
  permission_handler: ^11.0.1
  share_plus: ^7.1.0
  custom_refresh_indicator: ^3.0.0
  audioplayers: ^5.2.0
  path: ^1.8.3
  dio: ^5.3.3
  flutter_dotenv: ^5.1.0
  confetti: ^0.7.0
  themed: ^5.0.0
  custom_navigation_bar: ^0.8.2
  provider: ^6.1.1
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  connectivity_plus: ^5.0.2

  #social media logins
  google_sign_in: ^6.1.5
  sign_in_with_apple: ^5.0.0
  flutter_facebook_auth: ^6.2.0

  #twitter_login: ^4.4.2

  #generating assets
  flutter_gen: ^5.3.1

  ##firebase
  cloud_firestore: ^4.8.4
  firebase_auth: ^4.12.1
  firebase_core: ^2.21.0
  firebase_remote_config: ^4.2.4
  firebase_database: ^10.3.3
  firebase_storage: ^11.4.1
  firebase_analytics: ^10.6.3

  #api fetching and shared preferences/local access
  http: ^1.1.0
  shared_preferences: ^2.0.17
  file_picker: ^6.0.0

  #blocs
  bloc: ^8.1.2
  flutter_bloc: ^8.1.3

  #routing
  go_router: ^12.0.1
  cloud_functions: ^4.4.0
  json_serializable: ^6.7.1
  json_annotation: ^4.8.1
  # flutter_stripe: ^9.5.0+1
  firebase_app_check: ^0.2.1+3

dependency_overrides:
  meta: ^1.14.0
  analyzer: ^6.4.1

flutter_config:
  dotenv: .env

flutter_gen:
  colors:
    inputs:
      - assets/colors/colors.xml
  output: lib/views/widgets/generated_files/
  format: true
  integrations:
    flutter_svg: true

flutter_intl:
  enabled: true
  format: true
  arb_dir: lib/views/widgets/generated_files/strings/
  output_dir: lib/views/widgets/generated_files/strings/

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^2.4.6
  flutter_lints: ^3.0.0
  freezed: ^2.4.5

analyzer:
  exclude:
    - lib/views/widgets/generated_files/**
    - views/widgets/generated_files/**

flutter:
  uses-material-design: true
  assets:
    - assets/

Describe the Bug

Error on pod install, using deprecaded FBSDKMarketingKit.

Installing FBAEMKit (17.0.0) Installing FBAudienceNetwork (6.15.0) Installing FBSDKCoreKit (17.0.0) Installing FBSDKCoreKit_Basics (17.0.0) Installing FBSDKLoginKit (17.0.0) Installing FBSDKMarketingKit (4.38.0)

[!] Error installing FBSDKMarketingKit [!] /usr/bin/curl -f -L -o /var/folders/90/lq0w9f_j5jl66xgystgzwg_c0000gn/T/d20240416-92328-8rjzu4/file.zip https://origincache.facebook.com/developers/resources/?id=FacebookSDKs-iOS-4.38.0.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.13.0 cocoapods-downloader/1.6.3'

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: origincache.facebook.com Warning: Problem : timeout. Will retry in 1 seconds. 2 retries left. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: origincache.facebook.com Warning: Problem : timeout. Will retry in 2 seconds. 1 retries left. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: origincache.facebook.com

Expected Behavior

i should download correct pods.

To Reproduce

with flutter version 3.16.9, add flutter_facebook_auth: ^6.2.0 and run flutter pub get go to ios folder and run pod install.

Relevant log output

No response

flutter doctor -v

[!] Flutter (Channel stable, 3.16.9, on macOS 14.2.1 23C71 darwin-x64, locale fr-FR)
    • Flutter version 3.16.9 on channel stable at /Users/jeremyluisetti/fvm/versions/3.16.9
    ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.15.1/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/jeremyluisetti/fvm/versions/3.16.9. Consider adding /Users/jeremyluisetti/fvm/versions/3.16.9/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 41456452f2 (3 months ago), 2024-01-25 10:06:23 -0800
    • Engine revision f40e976bed
    • Dart version 3.2.6
    • DevTools version 2.28.5
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/jeremyluisetti/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.13.0

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554                            • android-x64 • Android 14 (API 34) (emulator)
    • Jeyremy’s iPhone  (mobile)   • 00008120-000655261463C01E                • ios         • iOS 17.4.1 21E236
    • iPad (2) (mobile)            • 3fc145e7c06967f236bdade356291764c9eb6d72 • ios         • iOS 17.0 21A329

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Info.plist (iOS)

No response

Podfile (iOS)

# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
pod 'FBAudienceNetwork'
pod 'FacebookSDK'
pod 'FacebookSDK/LoginKit'
pod 'FacebookSDK/ShareKit'
pod 'FacebookSDK/PlacesKit'
pod 'FBSDKMessengerShareKit'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
    end
  end
end

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

jeyremy commented 6 months ago

found it, it was because of my pods imports... sorry about that