facebook-ios-sdk
facebook-ios-sdk copied to clipboard
Can't get any event log in Event Manager
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
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)
Hi @karenxpn - What does your events manager page look like for the application you're issuing for?

Sorry it's not working for you
Curious if you have tried any of these:
-
Did you add
FacebookAutoLogAppEventsEnabled TRUE to the info.plist? -
Did you add Settings.isAutoLogAppEventsEnabled = true
-
If you're testing on your own phone are you signed into facebook.com?
@jamestouri yes all done
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.
Did you allow tracking (ATT) on the Facebook app otherwise no events will be logged.
Did you allow tracking (ATT) on the Facebook app otherwise no events will be logged.
yes its enabled
Hi @karenxpn , this issue is similar to https://github.com/facebook/facebook-ios-sdk/issues/1667 . Can you check the followings:
- SDK is initialized and iOS ATT is enabled
- Set the AdvertiserTrackingEnabled as True
- Set the AdvertiserIDCollectionEnabled as True
- 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
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:

This sporadically shows Installs registered:

This shows 14.5 ATE True status rate as this:

This constantly shows:

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
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:
This sporadically shows Installs registered:
This shows 14.5 ATE True status rate as this:
This constantly shows:
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(
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!
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.
Not solved...
Not solved...
Çözülmedi...
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):
-
Info.Plist

-
SceneDelegate



This will bring up the following pop up:

- In your viewcontroller:

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.
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.