Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 'setAdvertiserTrackingEnabled' is only available in iOS 12.0 or newer #344

Closed
1 task done
Unevenn opened this issue Mar 24, 2024 · 2 comments
Closed
1 task done
Assignees
Labels
bug🐞 Something isn't working

Comments

@Unevenn
Copy link

Unevenn commented Mar 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Swift Compiler Error (Xcode): 'setAdvertiserTrackingEnabled' is only available in iOS 12.0 or newer

FBAdSettings.setAdvertiserTrackingEnabled(enabled)

Expected Behavior

if #available(iOS 12.0, *) {
FBAdSettings.setAdvertiserTrackingEnabled(enabled)
}

Steps To Reproduce

Please fix setAdvertiserTrackingEnabled function with if block

Platform

iOS

Flutter Doctor

[✓] Flutter (Channel stable, 3.16.5, on macOS 14.1 23B74 darwin-arm64, locale
    tr-TR)
    • Flutter version 3.16.5 on channel stable at
      /Users/mustafabutun/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (3 months ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

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

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • 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.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.86.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.84.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        •
      android-arm64  • Android 13 (API 33) (emulator)
    • iPhone (mobile)             • 00008110-001241A20178801E            • ios
      • iOS 17.3.1 21D61
    • iPhone 13 Pro Max (mobile)  • 7385229B-2ADA-46BA-8258-BEA47266E74D • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
    • macOS (desktop)             • macos                                •
      darwin-arm64   • macOS 14.1 23B74 darwin-arm64
    • Chrome (web)                • chrome                               •
      web-javascript • Google Chrome 123.0.6312.58

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

• No issues found!
@Unevenn Unevenn added the bug🐞 Something isn't working label Mar 24, 2024
@mxkdev
Copy link

mxkdev commented Mar 25, 2024

I had the same issue. Turns out that Flutter was still configured to use iOS 11.0. I don't remember the exact steps but i think it was updating the Deployment targets in XCode to 12.0 and also this:

If you changed Deployment Target in your Xcode project, open ios/Flutter/AppframeworkInfo.plist in your Flutter app and update the MinimumOSVersion value to match.
From Flutter Docs: https://docs.flutter.dev/deployment/ios#updating-the-apps-deployment-version

I also manually changed the iOS Deployment Target of the facebook_app_events pod under XCode -> Project Navigator -> Pods -> facebook_app_events to 12.0 as well. But this might be a hack.

image

@antonoddbit
Copy link
Contributor

Thanks for reporting, will look on it @mxkdev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants