【发布时间】:2020-08-24 09:54:15
【问题描述】:
我正在尝试在我的颤振应用中实现深度链接。我正在使用uni_links 颤振包。
我正在将我的应用程序的深层链接发送到用户的电子邮件帐户。但是,在 gmail 中,您需要在 href 值中使用 http 协议,否则 gmail 将不会将其视为有效链接。因此,我不得不在电子邮件中使用以下链接:
<a href="https://myexample.flutter.dev">Click here</a>
而不是像这样的链接,
<a href="myexample://flutter.dev">Click here</a>
现在有了https://myexample.flutter.dev,当我从 gmail 打开链接时,它并没有打开我的应用程序。
但是,如果我将CFBundleURLSchemes 密钥更改为myexample 并将CFBundleURLName 更改为flutter.dev,当我在浏览器中输入myexample://flutter.dev 时,它会打开我的应用程序。但是,就像我之前提到的,这在 gmail 中不被识别为有效链接。
这里有什么问题?我该如何解决这个问题?
这是我的ios/Runner/Info.plist:
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>myexample.flutter.dev</string>
<key>CFBundleURLSchemes</key>
<array>
<string>https</string>
</array>
</dict>
</array>
【问题讨论】:
标签: ios flutter deep-linking url-scheme