我是 AWS 移动集线器的新手,我真的很困惑。我在移动集线器中有一个数据库,并且能够访问它。现在我想添加登录视图。我通过移动集线器输入并集成了一些用户帐户创建了池。我按照 AWS 中的指南,在 viewdidload 中调用内置 UI。运行时,实际弹出登录界面,可以检测用户名和密码是否匹配。但是,我按下了登录按钮,没有任何反应,永远停留在登录视图上。有谁熟悉这种情况?
if !AWSSignInManager.sharedInstance().isLoggedIn {
AWSAuthUIViewController.presentViewController(with: self.navigationController!,
configuration: nil,
completionHandler: { (provider: AWSSignInProvider, error: Error?) in
if error != nil {
print("Error occurred: \(String(describing: error))")
} else {
print("Sign in successful.")
}
})
}
代表与指南相同
类 AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, open url: URL,
sourceApplication: String?, annotation: Any) -> Bool {
return AWSMobileClient.sharedInstance().interceptApplication(
application, open: url,
sourceApplication: sourceApplication,
annotation: annotation)
}
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return AWSMobileClient.sharedInstance().interceptApplication(
application, didFinishLaunchingWithOptions:
launchOptions)
}
}
错误无法获取id
谢谢