gpt4 book ai didi

ios - 链接以在 ios 上从 phonegap 打开 waze 应用程序

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:22:50 26 4
gpt4 key购买 nike

当用户从 Phonegap 应用程序中单击以下链接时,我试图打开“Waze”应用程序。

它在 android 上运行良好,但在 IOS 上根本无法运行。

<a href="waze://?ll=latitude,longitude">Waze</a>

我需要为 IOS 做不同的事情吗?

最佳答案

Waze developer documentation 所示这是适用于 iOS 的正确 URL 方案。

但是,正如该页面上还指出的那样,在 iOS9+ 上,您需要在应用程序 .plist 中将该方案列入白名单:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>waze</string>
</array>

要在 Cordova 应用程序中执行此操作,您可以在 platforms/ios/MyProject/MyProject-Info.plist 中手动编辑 plist 或使用 cordova-custom-config通过 config.xml 中的 block 添加它的插件:

<platform name="ios">
<config-file platform="ios" target="*-Info.plist" parent="LSApplicationQueriesSchemes">
<array>
<string>waze</string>
</array>
</config-file>
</platform>

关于ios - 链接以在 ios 上从 phonegap 打开 waze 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40024343/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com