且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获取链接以在 iOS Meteor 应用程序的本机浏览器中打开?

更新时间:2023-01-01 17:22:11

您需要下载并安装 apache cordova 插件才能将此功能添加到您的meteor ios 应用程序中.

You'll need to download and install an apache cordova plugin to add this functionality into your meteor ios app.

只需在终端中运行此命令

Simply run this command into your terminal

meteor add cordova:cordova-plugin-inappbrowser@https://github.com/apache/cordova-plugin-inappbrowser/tarball/ba7cbe58d5812b51c3ece1

(这里是 tarball/ba7cbe58d5812b51c3ece1 的 ref)(使用最新的提交到主分支)

(here is a ref to the tarball/ba7cbe58d5812b51c3ece1) (use the latest commit to master branch)

然后只需将其添加到您的流星模板中,即可通过外部链接启动系统默认浏览器应用程序:

Then simply add this into your meteor template to launch the system default browser app with the external link:

<a href="" onclick="window.open('http://www.example-url.com', '_system');">
Hope this helps!
</a>

运行:流星运行 ios-device

Run: meteor run ios-device

(选择您信赖的模拟器并对其进行测试)

(select your trusty simulator and test her out)