How to enable logging everyting in Facebook iOS SDK for debugging purposes?
Asked Answered
A

2

7

I'm trying to debug my iOS app that integrates with Facebook iOS SDK 4.1. I would like to see a verbose log of Facebook's code. Is there a way to do that? Right now I don't see any log from Facebook. Thanks!

Atbara answered 5/5, 2015 at 6:36 Comment(0)
E
7

As stated in the documentation, you can enable debug logs by invoking the following method:

[FBSDKSettings enableLoggingBehavior:FBSDKLoggingBehaviorAppEvents];

Swift 5:

Settings.enableLoggingBehavior(.appEvents)
Elburr answered 31/10, 2016 at 11:19 Comment(3)
Swift version for whoever may be interested (as per documentation): SDKSettings.enableLoggingBehavior(.appEvents)Penetrating
As of Oct 2019 - It;s now Settings.enableLoggingBehavior(.appEvents)Nica
Settings.shared.enableLoggingBehavior(.appEvents)Brandabrandais
W
1

Enable debug logs to verify client-side app event usage using the following code. The debug logs contain detailed requests and responses formatted in JSON.

If you are using Swift language then

SDKSettings.enableLoggingBehavior(.AppEvents)

If you are working in Objective-C then you can use this below method to enable debug.

[FBSDKSettings enableLoggingBehavior:FBSDKLoggingBehaviorAppEvents];

This is only for debugging purpose. Please make sure to disable debug logs before deploying app in production.

Wynellwynn answered 19/11, 2018 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.