facebook-ios-sdk
facebook-ios-sdk copied to clipboard
Only a Few Events Gets Registered in Test Events Tab
Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing GitHub issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
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
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);
}
};