如何使用Cordova构建Today Widget / App Extension? [英] How to build a Today Widget / App Extension with Cordova?

查看:215
本文介绍了如何使用Cordova构建Today Widget / App Extension?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的应用需要今天扩展/小工具。有没有关于如何在Cordova应用程序中构建一个资源的资源?

An app I am working on needs a Today Extension / Widget. Are there any resources on how to build one into an Cordova app?

我发现这个,但它写的不是很清楚,而且从我所理解的看起来似乎是一个只使用了应用程序和窗口小部件中的HTML5元素显示一些数据:/

I found this, but it's not written very clearly and from what I understood seems to be a native app that only uses a HTML5 element in the app and widget to display some data :/

推荐答案

是的,你是对的,今天扩展是原生的东西。我最近还做了很多关于如何动态地将一个集成到一个cordova项目中的研究,并最终为此创建了我自己的cordova插件。您可以在这里找到它,也许它对您也有用!不过你必须在Swift中实现这个小部件。

Yes you are right, today extension are a native thing. I recently also did a lot of research on how to integrate one into a cordova project dynamically and ended up creating my own cordova-plugin for that. You can find it here, maybe it will be useful for you too! Nevertheless you will have to implement the widget in Swift.

该插件采用一个已经开发的小部件并将其集成到每个的cordova-ios项目中cordova平台添加ios 使用一个钩子,它通过科尔多瓦节点-xcode的

The plugin takes an already developed widget and integrates it in an cordova-ios project on every cordova platform add ios using a hook which parses and modifies the project.pbxproj via the help of cordova-node-xcode.

这篇关于如何使用Cordova构建Today Widget / App Extension?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆