darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
194 stars 129 forks source link

App crashes on iOS if FacebookAppID persist in info.plist #271

Closed vytautas-pranskunas- closed 1 year ago

vytautas-pranskunas- commented 1 year ago

What version are you using?

4.4.1

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

iOS 15.2

What platforms are you seeing the problem on?

iOS

pubspec.yaml

name: senio_assist
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 99.99.99+99

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  apple_sign_in_safety: ^0.0.6
  auto_size_text: ^3.0.0
  cached_network_image: ^3.1.0
  collection: ^1.15.0-nullsafety.4
  connectivity_plus: ^2.2.0
  country_code_picker: ^2.0.1
  cupertino_icons: ^1.0.2
  darq: ^1.1.1
  datadog_flutter: ^2.0.0
  dio: ^4.0.0
  email_validator: ^2.0.1
  enum_to_string: ^2.0.1
  fancy_on_boarding: ^1.8.0-nullsafety.0
  feature_discovery: ^0.14.1
  file_picker: ^4.0.3
  firebase_analytics: ^9.0.4
  firebase_auth: ^3.3.4
  firebase_dynamic_links: ^4.0.3
  firebase_messaging: ^11.2.5
  flutter:
    sdk: flutter
  flutter_cache_manager: ^3.1.2
  flutter_credit_card: ^3.0.1
  flutter_facebook_auth: ^4.4.1
  flutter_fgbg: ^0.2.0
  flutter_image_compress: ^1.0.0
  flutter_inapp_purchase: ^5.0.1
  flutter_local_notifications: ^9.2.0
  flutter_localizations:
    sdk: flutter
  flutter_markdown: ^0.6.2
  flutter_mobx: ^2.0.0
  flutter_native_timezone: ^2.0.0
  flutter_rating_bar: ^4.0.0
  flutter_screenutil: ^5.5.3+2
  flutter_slidable: ^1.0.0-dev.8
  flutter_spinkit: ^5.0.0
  flutter_typeahead: ^4.0.0
  fresh_dio: ^0.3.1
  fresh_graphql: ^0.5.1
  geocoding: ^2.0.0
  geolocator: ^8.2.1
  get_it: ^7.0.0
  google_sign_in: ^5.2.1
  graphql_flutter: ^5.1.1-beta.3
  hive: ^2.0.4
  hive_flutter: ^1.0.0
  image_cropper: ^2.0.3
  image_picker: ^0.8.4+4
  intl: ^0.17.0
  launch_review: ^3.0.1
  libphonenumber: ^2.0.0
  load: ^1.0.0
  location: ^4.1.1
  mime: ^1.0.0
  mobx: ^2.0.1
  objectdb: ^1.2.1
  oktoast: ^3.0.0
  passbase_flutter: ^2.13.3
  purchases_flutter: ^3.8.0
  rxdart: ^0.27.3
  sentry: ^6.2.2
  stripe_payment:
    git:
      url: https://github.com/vytautas-pranskunas-/flutter_stripe_payment.git
      ref: master
  styled_text: ^5.1.0
  table_calendar: ^3.0.0
  url_launcher: ^6.0.3
  uuid: ^3.0.4
  youtube_player_flutter: ^8.0.0

dev_dependencies:
  build_runner: ^2.0.1
  flutter_launcher_icons: ^0.9.0
  flutter_lints: ^1.0.4
  flutter_test:
    sdk: flutter
  mobx_codegen: ^2.0.1+3
  mockito: ^5.0.16

flutter_icons:
  ios: true
  android: true
  image_path_ios: "stuff/launcher/fallback_icon_ios.png"
  image_path_android: "stuff/launcher/fallback_icon.png"
  adaptive_icon_background: "stuff/launcher/background.png"
  adaptive_icon_foreground: "stuff/launcher/foreground.png"

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true
  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/
    - assets/lang/
    - assets/images/
    - assets/images/flags/
    - assets/images/credit_cards/
    - assets/terms_and_conditions/
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg
  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.
  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages
  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Merriweather
      fonts:
        - asset: assets/fonts/Merriweather-Black.ttf
        - asset: assets/fonts/Merriweather-BlackItalic.ttf
        - asset: assets/fonts/Merriweather-Bold.ttf
        - asset: assets/fonts/Merriweather-BoldItalic.ttf
        - asset: assets/fonts/Merriweather-Italic.ttf
        - asset: assets/fonts/Merriweather-Light.ttf
        - asset: assets/fonts/Merriweather-LightItalic.ttf
        - asset: assets/fonts/Merriweather-Regular.ttf
          style: normal
    - family: SenioIcons
      fonts:
        - asset: assets/fonts/SenioIcons.ttf
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Describe the Bug

When i there is FacebookAppID in my info.plist app is crashign wih this report I am attaching crash report

https://drive.google.com/file/d/1Kxoyb8FcZCX54MjND6aYjjt6nnFkJpZV/view?usp=sharing

Expected Behavior

not to break

To Reproduce


Relevant log output

No response

flutter doctor -v

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en-CH)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.70.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Info.plist (iOS)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Senio Assist</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>senio_assist</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>NSCameraUsageDescription</key>
    <string>Will allow to attach photos to request and complete identity check</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>In order to find closes service providers</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>In order to find closes service providers</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>In order to find closes service providers</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Will allow to attach images to request and complete identity check</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>remote-notification</string>
    </array>
    <key>io.flutter.embedded_views_preview</key>
    <true/>
    <key>CFBundleURLTypes</key>
    <array>
        <!-- <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>----</string>
            </array>
        </dict> -->
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>----</string>
                <string>---</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>3ds.stripesdk.io</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>stripesdk</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>com.senio.assist</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.senio.assist</string>
            </array>
        </dict>
    </array>
    <key>FacebookAppID</key>
    <string>----</string>
    <key>FacebookDisplayName</key>
    <string>SenioAssist</string>
    <key>FirebaseAppDelegateProxyEnabled</key>
    <false/>
    <key>FirebaseDynamicLinksCustomDomains</key>
    <array>
        <string>https://senio.page.link/stripe</string>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbapi</string>
        <string>fbapi20130214</string>
        <string>fbapi20130410</string>
        <string>fbapi20130702</string>
        <string>fbapi20131010</string>
        <string>fbapi20131219</string>
        <string>fbapi20140410</string>
        <string>fbapi20140116</string>
        <string>fbapi20150313</string>
        <string>fbapi20150629</string>
        <string>fbapi20160328</string>
        <string>fbauth</string>
        <string>fb-messenger-share-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
        <string>itms-beta</string>
        <string>itms</string>
    </array>
</dict>
</plist>

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

darwin-morocho commented 1 year ago

@vytautas-pranskunas- after check in your Info.plist the FacebookClientToken is missing and when this is not present the app does not start

https://facebook.meedu.app/docs/4.x.x/ios

vytautas-pranskunas- commented 1 year ago

@darwin-morocho yes you are right! It starts now. Hmm weired behaviour - why it starts on Android (there it was missing also) When it was introduced? It was not required in version 3.5.0 - 4.3.0

darwin-morocho commented 1 year ago

@darwin-morocho yes you are right! It starts now. Hmm weired behaviour - why it starts on Android (there it was missing also) When it was introduced? It was not required in version 3.5.0 - 4.3.0

Since the facebook native sdk 11.2.0 the CLIENT TOKEN is required. On android you also need add the client token.

may be the problem is with the most recent devices (ios 15.x and android 12.x) if you don't add the client token that devices can crash too