ios - GTMAppAuth 抛出错误«无法打开 Safari»
问题描述
我正在尝试通过 Cocoapods 将 GTMAppAuth 实现到我的应用程序中。
但是当我尝试用这个开始这个过程时:
appDelegate.currentAuthorizationFlow = [OIDAuthState
authStateByPresentingAuthorizationRequest:request
externalUserAgent: userAgent
callback:^(OIDAuthState * _Nullable authState, NSError * _Nullable error) { … }
我收到一条错误消息unable to open Safari
。
我在互联网上找不到任何可以告诉我为什么会发生此错误的内容。
我确实在 info.plist 中设置了 URL 方案。
有任何想法吗?
[编辑]
我想提一下,框架附带的示例似乎是错误的,或者至少已经过时了。我只能使用OIDAuthState authStateByPresentingAuhtorizationRequest: externalUserAgent: callback
-但在示例中他们使用的是OIDAuthState authStateByPresentingAuthorizationRequest: callback:
或者OIDAuthState authStateByPresentingAuthorizationRequest: presentingViewController: callback
-我无法在我的代码中访问它们。
解决方案
推荐阅读
- node.js - AWS Lamdba nodejs12.x 错误 `args[3]->IsInt32()' 失败
- autodesk-forge - 加载多个模型时,Forge 查看器中的启动模型浏览器崩溃
- php - 调用构造函数时未初始化静态属性php
- algorithm - Insert N numbers in a maximum binary heap
- javascript - how to delete eventListener. removeEventListener doesn't work
- python - How can I properly run 2 threads that await things at the same time?
- javascript - How to block/break/disable a request from a third-party tool?
- format - Excel VBA:在下面创建新行并仅复制带有公式的单元格
- javascript - Can you use JavaScript for changing a existing Python variable?
- c# - 发布 Visual Studio 应用程序时 SoundPlayer 不工作