FBSDK empty login view

2020-03-03 06:29发布

Since upgraded to the newest Xcode, I ran into some issues with FBSDK while trying to login via FBSDKLoginManager. The login window in Safari pops up but it stays white (empty view), without either navigation items or content.

Console returns the following:

[ViewService] Failed to get remote view controller with error: Error: domain=_UIViewServiceInterfaceErrorDomain, code=2

5条回答
一纸荒年 Trace。
2楼-- · 2020-03-03 06:41

Yesterday evening it used to work in my app, today is not working anymore. I found an article on Apple devs saying that this is an Apple's bug and a workaround would be to remove any background images from the button you're about to tap to login. This sounds illogic, no idea why. For me it doesn't work but you may try.

查看更多
够拽才男人
3楼-- · 2020-03-03 06:42

I was facing similar issue, and following worked for me...

Click on App Target -> Capabilities -> Turn the keychain sharing on.

here is the reference image showing this setting.

https://app.box.com/s/mg7hyp1i9qp89mmmqdi2kq2i41bp0cak

查看更多
何必那么认真
4楼-- · 2020-03-03 06:45

I just cleared History and Website data of safari in settings and now it works.I thinks this is something related to SFSafariViewController.

enter image description here

Hope it helps!

查看更多
何必那么认真
5楼-- · 2020-03-03 06:55

You don't have to clear history. Only clearing the website-data (under Advanced) will do the trick too. In that way you don't lose your history on all devices.

查看更多
时光不老,我们不散
6楼-- · 2020-03-03 07:03

Try dragging a new view controller into your storyboard and assign the login page class to that storyboard view controller and run. This should work.

查看更多
登录 后发表回答