'React Native app not sending events to iOS 14.5 users
My react native app is not showing any events in the Facebook Event Manager from iOS 14.5 users. It works fine for Android and iOS 13 users. I have the same issue with the Kochava system also, it only shows installs from Android and iOS 13 users.
Is there something I am missing which needs to be setup in App Store Connect for the app or in React Native for the app to pass events on for iOS 14 users? It doesn't work even with allow app tracking turned on.
Solution 1:[1]
Starting with iOS 14.5, iPadOS 14.5, and tvOS 14.5, you’ll need to receive the user’s permission through the AppTrackingTransparency framework to track them or access their device’s advertising identifier.
if you're using react-native-fbsdk
you need to set Settings.setAdvertiserTrackingEnabled(true)
in order to see the events come in facebook event manager.
Solution 2:[2]
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();
});
}
} 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);
}
};
You need to ask for permission to track or your app will get denied.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Gery |
Solution 2 | ertemishakk |