FB login working from xcode not from emulator

I recently made some changes to my app and it has broken my fb login. Here is what I did:
upgraded to xcode 8.3 from 8.0
added phonegap push plugin for ionic cloud push notifications

After these changes my fb login stopped working when I’m using “ionic emulate ios -l -c”, I get a “There was a problem logging you in”. This is such a cryptic error.
However if I use xcode to run the app in the simulator, the login starts working. I have enabled keychain sharing in xcode for ios 10.

Any ideas what could be wrong?