gpt4 book ai didi

ios - 无法获取远程 View Controller ,错误为 : Error: domain=_UIViewServiceInterfaceErrorDomain, code=2

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:57:24 24 4
gpt4 key购买 nike

我有一个非常令人沮丧的错误。我进行 iOS 开发已经 3 个月了。我一直在登录 facebook,然后连接到 Firebase。我一开始就实现了这一点。它运行完美,今天我醒来将应用程序放到商店...但 Facebook 登录不起作用。

我登录 Facebook 的代码绝对没有任何变化(我几乎可以肯定,但我已经检查了所有内容!)发生的事情是您单击 facebook 登录按钮,它只会是白色的(通常会有是一个互联网浏览器)。我得到的错误是:

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

我绝对没有更改任何代码。我的 bundleID 和 appID 与 facebook 开发人员中的相同。

我完全不知道它是什么,而且极少数有类似问题的人似乎也不知道。我想了解,但只要能够解决它并且将来不会发生,那就太好了!我正在快速编码,但我没有像 Facebook 文档中那样使用 swiftSDK,而是使用 FBSDKLoginButton。

我也曾在模拟器上尝试过,但没有发生。它只发生在我的手机上。

我真的不确定什么是有用的信息,所以如果我包含不相关的信息,我很抱歉。

我正在使用 facebook sdk 4.20.2

这是我的 info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>CeleBreak</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb1253394891414659</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>FacebookAppID</key>
<string>1253394891414659</string>
<key>FacebookDisplayName</key>
<string>CelebreakApp</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbauth2</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSExceptionDomains</key>
<dict/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>

这是我的登录VC:

class LoginVC: UIViewController: FBSDKLoginButtonDelegate {
@IBOutlet weak var loginButton: FBSDKLoginButton!

public var originVC: UIViewController = TabBarController()

override func viewDidLoad(){
phoneNumberTextField.delegate = self
loginButton.delegate = self
phoneNumberTextField.keyboardType = UIKeyboardType.numberPad
}
func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error?) {

}
func loginButtonDidLogOut(_ loginButton: FBSDKLoginButton!) {
fatalError("Logging out in Login View shouldn't happen")
}
}

那么登录按钮就是一个FBSDKLoginButton。当我浏览 Facebook 文档时,它并没有解释如何这样做,而是解释了如何使用 swift SDK 来完成,但我按照指南以这种方式设置 Facebook,但并没有真正理解它。

最佳答案

解决方案:清除手机上 Safari 设置中的数据和历史记录。

来源:https://stackoverflow.com/a/44457044/7442549

我在彻底测试我的登录流程时遇到了同样的问题 - 重复登录/注销,使用 FB 原生应用程序而不是 Safari 登录等。

我猜这是FB登录/Safari之间交互的弱点。

关于ios - 无法获取远程 View Controller ,错误为 : Error: domain=_UIViewServiceInterfaceErrorDomain, code=2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44327068/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com