Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized

I just use Facebook Analytics in my iOS app using FBSDKCoreKit 8.1.0 (latest)

This error message keeps flooding my log:

FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.

I don't even use the Graph API.

I've set up everything according to: https://developers.facebook.com/docs/ios/getting-started/

Any idea on how I can get rid of this?

like image 319
themenace Avatar asked Nov 03 '20 21:11

themenace


1 Answers

Turns out most of the warnings were sent because I forgot to execute this line, after the user accepted the terms & conditions:

ApplicationDelegate.initializeSDK(nil)

I already had these two setup, but the above was missing:

Settings.isAutoLogAppEventsEnabled = true
Settings.isAdvertiserIDCollectionEnabled = true

What confused me was, that it was working before and an update of the FBSDKCoreKit must somehow have broken it.

The warning will still show up for no reason in the app's startup phase. This is also mentioned in this stackoverflow question. Let me know if you have a fix for this one.

like image 109
themenace Avatar answered Nov 14 '22 18:11

themenace