应用程序流程要求用户访问网页并更新一些细节,之后用户需要返回网站提供的ID。
蛋情景:
User logs in application
clicks button goes to the website update few details
stays in the Webview for the website
必需的场景:
Should come back to the app with the id that website provided
该应用程序的流程类似于谷歌Oauth,用户点击谷歌按钮来验证谷歌使用谷歌帐户。
您可以在WKWebView中显示该网页。假设您也正在编写网页编码,您还可以使用evaluateJavaScript(:completionHandler:)来确定网站何时完成,获取结果并调整WKWebView。或者,您可以使用WKNAvigationDelegate方法webView(:didStartProvisionalNavigation:)拦截成功导航,然后从服务器获取所需的任何信息。