问题描述
我使用deeplink通过Flutter打开另一个应用程序。 我使用 lib external_app_launcher
如果我只使用scheme,打开另一个应用程序,如果我在scheme中传递参数,它不起作用。
我还使用了 url_launch、Flutter_appavailability 库,但它们不适用于 iOS。
请帮我解决。
提前致谢!!!
如果我使用:
- iosUrlScheme: 'myscheme:// - 运行良好,打开了另一个应用程序
- iosUrlScheme: 'myscheme://abc.com?arg1=1234 - 它效果不佳,打开了另一个应用程序
示例代码:
信息拆分
<key>LSApplicationQueriesSchemes</key>
<array>
<string>myscheme</string> app
</array>
MyWidget
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),),body: Center(
child: Container(
height: 50,width: 150,child: RaisedButton(
color: Colors.blue,onpressed: () async {
await LaunchApp.openApp(
androidPackageName: 'my.package.name',iosUrlScheme: 'myscheme://abc.com?arg=1234',openStore: false
);
// Enter thr package name of the App you want to open and for iOS add the URLscheme to the Info.plist file.
// The second arguments decide wether the app redirects PlayStore or AppStore.
// For testing purpose you can enter com. instagram.android
},child: Container(
child: Center(
child: Text(
"Open",textAlign: TextAlign.center,))),);
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)