-1

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: client_id)

In my current project (Swift) I am getting the above error, even when I haven't used that key anywhere in the project. I got the error after Facebook integration.

But the same key was used in my previous project. To resolve this problem, I cleaned my build and even uninstalled both previous and current app and then rerun build. Still facing error.

I searched for the key access client_id in all files, but I couldn't find it.

Wernsey
  • 5,411
  • 22
  • 38
Avinash Jadhav
  • 491
  • 4
  • 17

2 Answers2

0

in the breakpoints tab, add exception breakpoint and see where exception is being hit. It is most likely you are adding a nil value to a dictionary.

FatalError
  • 574
  • 1
  • 7
  • 18
  • App crashes when I click on Facebook Login Button of facebook SDK integrated in app. – Avinash Jadhav Apr 28 '15 at 06:06
  • put the exception breakpoint and see where it breaks. You need to set this client_id somewhere (Appdelegate?) before you run the SDK. It is generally commented out. – FatalError Apr 28 '15 at 06:39
0

Actually your Info.plist file for facebook SDK integration is not properly configured and saved. For more detail refer FBSDK documentation Visit https://developers.facebook.com/docs/ios/getting-started

Avinash Jadhav
  • 491
  • 4
  • 17