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

Can't get any event log in Event Manager #1926

Closed
5 tasks done
karenxpn opened this issue Oct 29, 2021 · 19 comments
Closed
5 tasks done

Can't get any event log in Event Manager #1926

karenxpn opened this issue Oct 29, 2021 · 19 comments
Labels

Comments

@karenxpn
Copy link

karenxpn commented Oct 29, 2021

Checklist before submitting a bug report

Xcode version

13.2

Facebook iOS SDK version

12.0.2

Dependency Manager

CocoaPods

SDK Framework

Core

Goals

Just wanna connect my app and see events in Event Manager.

Expected results

Events should be logged in to the Event Manager but nothing happens. I have updated everything to the latest versions and trying to achieve the result for 2days.

Actual results

Nothing happens.

Steps to reproduce

No response

Code samples & details

AppEvents.logEvent(.viewedContent)

@jamestouri
Copy link
Contributor

Hi @karenxpn - What does your events manager page look like for the application you're issuing for?

@karenxpn
Copy link
Author

karenxpn commented Nov 1, 2021

image

@jamestouri
Copy link
Contributor

Sorry it's not working for you

Curious if you have tried any of these:

  1. Did you add
    FacebookAutoLogAppEventsEnabled
    TRUE
    to the info.plist?

  2. Did you add
    Settings.isAutoLogAppEventsEnabled = true

  3. If you're testing on your own phone are you signed into facebook.com?

@karenxpn
Copy link
Author

karenxpn commented Nov 1, 2021

@jamestouri yes all done

@andreibilyk
Copy link

Faced the same issue with latest released SDK version.

Dependency Manager

CocoaPods
pod 'FBSDKCoreKit'

Pods' versions

FBAEMKit (12.1.0)
FBSDKCoreKit (12.1.0)
FBSDKCoreKit_Basics (12.1.0)

Minimum supported IOS version

IOS 14.1

App Configuration

https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#add-events

AppDelegate:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ApplicationDelegate.shared.application( application, didFinishLaunchingWithOptions: launchOptions ) Settings.shared.isAutoLogAppEventsEnabled = true }

SceneDelegate:
func sceneDidBecomeActive(_ scene: UIScene) { AppEvents.shared.activateApp() }

Info.plist

<key>FacebookAutoLogAppEventsEnabled</key> <string>TRUE</string>

Expected Behaviour

Receiving install events and purchase events

Current Behaviour

Install event was received only one time. However, app was installed on several different devices (not simulators). Currently app is in production mode in App Store and still doesn't receive auto logged app events.

@teejayhh
Copy link

teejayhh commented Dec 21, 2021

Did you allow tracking (ATT) on the Facebook app otherwise no events will be logged.

@karenxpn
Copy link
Author

Did you allow tracking (ATT) on the Facebook app otherwise no events will be logged.

yes its enabled

@KylinChang
Copy link
Contributor

KylinChang commented Dec 21, 2021

Hi @karenxpn , this issue is similar to #1667 . Can you check the followings:

  1. SDK is initialized and iOS ATT is enabled
  2. Set the AdvertiserTrackingEnabled as True
  3. Set the AdvertiserIDCollectionEnabled as True
  4. Log in FB App on the same device and allow tracking

It'd be better if you can provide more details like AppID and FB SDK related settings in info.plist. Thanks

@datoon83
Copy link

datoon83 commented Jan 11, 2022

I can't get this working either:
634763881213996

Facebook info.plist settings:

<key>CFBundleURLTypes</key>
<array>
<dict>
  <key>CFBundleURLSchemes</key>
  <array>
  <string>fb634763881213996</string>
  <string>#DISPLAY_NAME#</string>
  </array>
</dict>
</array>
<key>FacebookAppID</key>
<string>634763881213996</string>
<key>FacebookClientToken</key>
<string>#CLIENT_TOKEN#</string>
<key>FacebookDisplayName</key>
<string>#DISPLAY_NAME#</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
	<key>SKAdNetworkIdentifier</key>
	<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
	<key>SKAdNetworkIdentifier</key>
	<string>n38lu8286q.skadnetwork</string>
</dict>
</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>
</array>

Using the community version of React Native SDK - so using the latest SDK - 12.2.1:
https://github.com/thebergamo/react-native-fbsdk-next/releases/tag/v6.2.0

App.tsx:

useEffect(() => {
    const changeListener = AppState.addEventListener(
      'change',
      async (nextAppState) => {
        if (Platform.OS === 'ios' && nextAppState === 'active') {
          const trackingStatus = await getTrackingStatus();
          const isEnabled = (result: TrackingStatus): boolean =>
            result === 'authorized' || result === 'unavailable';
          Settings.setAdvertiserTrackingEnabled(isEnabled(trackingStatus));
          Settings.initializeSDK();
        }
      },
    );

    return () => {
      changeListener.remove();
    };
  }, []);

AppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];

  return YES;
}

This shows as up to date:
image

This sporadically shows Installs registered:
image

This shows 14.5 ATE True status rate as this:
image

This constantly shows:
image

Spent quite a few days trying to understand what I'm doing wrong now...

Struggling with the documentation if I'm honest:
https://developers.facebook.com/quickstarts/634763881213996/?platform=ios

Differs from this:
https://developers.facebook.com/docs/app-events/getting-started-app-events-ios

@KotMira
Copy link

KotMira commented Jan 21, 2022

I can't get this working either: 634763881213996

Facebook info.plist settings:

<key>CFBundleURLTypes</key>
<array>
<dict>
  <key>CFBundleURLSchemes</key>
  <array>
  <string>fb634763881213996</string>
  <string>#DISPLAY_NAME#</string>
  </array>
</dict>
</array>
<key>FacebookAppID</key>
<string>634763881213996</string>
<key>FacebookClientToken</key>
<string>#CLIENT_TOKEN#</string>
<key>FacebookDisplayName</key>
<string>#DISPLAY_NAME#</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
	<key>SKAdNetworkIdentifier</key>
	<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
	<key>SKAdNetworkIdentifier</key>
	<string>n38lu8286q.skadnetwork</string>
</dict>
</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>
</array>

Using the community version of React Native SDK - so using the latest SDK - 12.2.1: https://github.com/thebergamo/react-native-fbsdk-next/releases/tag/v6.2.0

App.tsx:

useEffect(() => {
    const changeListener = AppState.addEventListener(
      'change',
      async (nextAppState) => {
        if (Platform.OS === 'ios' && nextAppState === 'active') {
          const trackingStatus = await getTrackingStatus();
          const isEnabled = (result: TrackingStatus): boolean =>
            result === 'authorized' || result === 'unavailable';
          Settings.setAdvertiserTrackingEnabled(isEnabled(trackingStatus));
          Settings.initializeSDK();
        }
      },
    );

    return () => {
      changeListener.remove();
    };
  }, []);

AppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];

  return YES;
}

This shows as up to date: image

This sporadically shows Installs registered: image

This shows 14.5 ATE True status rate as this: image

This constantly shows: image

Spent quite a few days trying to understand what I'm doing wrong now...

Struggling with the documentation if I'm honest: https://developers.facebook.com/quickstarts/634763881213996/?platform=ios

Differs from this: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios

Were you able to solve the problem? I can't get it to work either(

@datoon83
Copy link

I enabled AEM for my project and this seems to work.

I had to upgrade to the beta version of this:
"react-native-fbsdk-next": "7.0.0-beta.4"

Then followed the instructions found here:
https://github.com/thebergamo/react-native-fbsdk-next/tree/beta#aggregated-event-measurementaem-for-ios

Seems to be working now for us!

@github-actions
Copy link

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 22, 2022
@karenxpn
Copy link
Author

Not solved...

@github-actions github-actions bot removed the Stale label Apr 23, 2022
@facebook facebook deleted a comment from 123gid May 3, 2022
@camboYY
Copy link

camboYY commented Jul 25, 2022

Not solved...

@ayhedanakliyat
Copy link

Çözülmedi...

@DonTharaka
Copy link

Facebook documentation on app events is very vague. It does not contain any information about ATTrackingManager which is necessary to track events. First follow all steps in the documentation. Below are the steps I have taken to successfully connect app events (iOS 15):

  1. Info.Plist
    Screen Shot 2022-08-11 at 10 44 47 am

  2. SceneDelegate

Screen Shot 2022-08-11 at 10 50 43 am

Screen Shot 2022-08-11 at 11 05 33 am

Screen Shot 2022-08-11 at 10 48 40 am

This will bring up the following pop up:

Screen Shot 2022-08-11 at 10 58 05 am

  1. In your viewcontroller:

Screen Shot 2022-08-11 at 10 52 39 am

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 9, 2022
@github-actions
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@oricoh
Copy link

oricoh commented Aug 23, 2024

not solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

12 participants