facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

Only a Few Events Gets Registered in Test Events Tab

Open ertemishakk opened this issue 3 years ago • 0 comments

Checklist before submitting a bug report

Xcode version

13.2.1

Facebook iOS SDK version

9.3.0+

Dependency Manager

Other / I don't know

SDK Framework

Other / I don't know

Goals

Trying to get events to show on events manager. Events are registered within Overview Tab and some events randomly get registered within Test Events tab. Everything was working up until yesterday. All the events were getting registered and as of today, I don't receive anything. No changes were done to the code base within this time frame.

Expected results

Get all events to show on Test Events tab.

Actual results

Some events get emitted on Test Events tab

Screen Shot 2022-04-16 at 10 52 08 am Screen Shot 2022-04-14 at 7 13 36 pm Screen Shot 2022-04-14 at 7 22 46 pm

Steps to reproduce

Step 1: Configure App for Facebook SDK Step 2: Register and Configure Your App with Facebook Step 3: Link Ad Account Step 4: Enable ATT both on Facebook and the App

Code samples & details

initializeFB = async () => {
    if (Platform.OS === 'ios') {
      const ATT_CHECK = await check(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY);
      if (ATT_CHECK === RESULTS.DENIED && parseInt(Platform.Version) > 13) {
        try {
          const ATT = await request(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY);
          if (ATT === RESULTS.GRANTED) {
            FBSettings.setAdvertiserTrackingEnabled(true).then(() => {
              FBSettings.initializeSDK();
              AppEventsLogger.logEvent('test', 14, { type: 'ios' });
            });
          }
        } catch (error) {
          throw error;
        } finally {
          FBSettings.initializeSDK();
        }
        FBSettings.initializeSDK();
        FBSettings.setAdvertiserTrackingEnabled(true);
      } else if (ATT_CHECK === RESULTS.UNAVAILABLE) {
        FBSettings.initializeSDK();
        FBSettings.setAdvertiserTrackingEnabled(true);
      }
    } else {
      FBSettings.initializeSDK();
      FBSettings.setAdvertiserTrackingEnabled(true);
    }
  };

ertemishakk avatar Apr 14 '22 09:04 ertemishakk