gpt4 book ai didi

iOS Line SDK登录失败: Error User Cancelled or Interrupted the login process

转载 作者:行者123 更新时间:2023-11-30 10:57:02 27 4
gpt4 key购买 nike

我从 GitHUB 下载了 line-sdk-ios-swift-master 。然后将 key 替换为我的 Line 帐户 key ,将项目标识符替换为 com.myproject.yeah ,我可以成功登录并检索 AuthID。

但是当我尝试在我的项目中复制相同的内容时,就会出现问题。

我从 line-sdk-ios-swift-master 复制了完全相同的代码(Utils、LoginViewController等)并设置了 .plist 。

我可以通过登录,sdk向我请求许可。 (取消允许),它将我重定向到“MYAPPNAME”和“openthisapp?” (取消确定)

点击(确定)并“在“myapp”中打开”后

它将我重定向回应用程序,但登录失败,并出现错误“用户取消或中断了登录过程”

最佳答案

您需要在 AppDelegate 中处理应用程序的打开:

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return LoginManager.shared.application(app, open: url, options: options)
}

如果没有,LINE SDK 会认为您的用户无任何结果地切换回您的应用,从而导致登录失败。

更多内容可以查看文档页面here 。第 3 步中对此进行了描述。

关于iOS Line SDK登录失败: Error User Cancelled or Interrupted the login process,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53850356/

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