【发布时间】:2020-08-05 11:09:59
【问题描述】:
我正在尝试在用户输入安全码后从 BankId 应用重定向到我的 Flutter 应用。
它在 Android 中运行良好,但在 iOS 中,当我将 URL 重定向设置为我的自定义 URL 方案时,它不会自动返回到应用程序。
if (Platform.isIOS) {
const redirect = "rememberapp://";
url = "https://app.bankid.com/?autostarttoken=[$autoToken]&redirect=$redirect";
if (await canLaunch(url)) {
await launch(url, forceSafariVC: false);
} else {
throw 'Could not launch $url';
}}
当我在 safari 中添加 URL 方案时,它会打开应用程序,但当我尝试从另一个应用程序重定向时它不起作用。
【问题讨论】:
-
请将您的代码发布为文本而不是图像。
标签: ios flutter redirect url-scheme bankid