oddbit / flutter_facebook_app_events

Flutter Plugin for Facebook App Events
https://pub.dev/packages/facebook_app_events
Apache License 2.0
119 stars 296 forks source link

[Bug]: "Please set a value for FacebookAutoLogAppEventsEnabled" #322

Closed rignaneseleo closed 5 months ago

rignaneseleo commented 7 months ago

Is there an existing issue for this?

Current Behavior

When I run the app, I receive this error in the xcode log:

<Warning>: Please set a value for FacebookAutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events.
<Warning>: You haven't set a value for FacebookAdvertiserIDCollectionEnabled. Set the flag to TRUE if you want to collect Advertiser ID for better advertising and analytics results.
<Warning>: The value for FacebookAdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results.

In my main.dart file I have:

bool ATTenabled = await readATTPermission();
await FacebookAppEvents().setAdvertiserTracking(enabled: ATTenabled);
await FacebookAppEvents().setAutoLogAppEventsEnabled(ATTenabled);

Expected Behavior

I expect to run it without that warning.

Steps To Reproduce

  1. run the main.dart with:

    bool ATTenabled = await readATTPermission();
    await FacebookAppEvents().setAdvertiserTracking(enabled: ATTenabled);
    await FacebookAppEvents().setAutoLogAppEventsEnabled(ATTenabled);
  2. read the xcode log

Platform

iOS

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.83.1)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPad di Leonardo. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!
antonoddbit commented 6 months ago

Hi @rignaneseleo have you update your info.plist file ?

rignaneseleo commented 6 months ago

If you mean this code:

<key>CFBundleURLTypes</key>
<array>
  <dict>
  <key>CFBundleURLSchemes</key>
  <array>
    <string>fb[APP_ID]</string>
  </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookClientToken</key>
<string>[CLIENT_TOKEN]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>

Yes, I did.

Goodstuff4UonYT commented 6 months ago

Same issue here

antonoddbit commented 6 months ago

We will check this issue

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 6 months ago

This issue was closed because it has been stalled for 5 days with no activity.

alondahari commented 6 months ago

@antonoddbit could you reopen this issue? it's still happening. Thanks!

antonoddbit commented 6 months ago

@jazzdragon @rignaneseleo @Goodstuff4UonYT Have you tried adding these on your info.plist in the ios side?

 <key>FacebookAutoLogAppEventsEnabled</key>
 <string>TRUE</string>
 <key>FacebookAdvertiserIDCollectionEnabled</key>
 <string>TRUE</string>
rignaneseleo commented 6 months ago

is it <string>TRUE</string> or <true/>?

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 5 months ago

This issue was closed because it has been stalled for 5 days with no activity.