且构网

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

如何在工作灯中创建本地通知

更新时间:2023-01-14 23:24:25

iOS的本地通知功能在Worklight中没有内置支持。

iOS's Local Notifications feature does not have built-in support in Worklight.

添加本地通知支持的一种方法是扩展您的应用程序使用Cordova插件,这将允许你运行本机代码。

这意味着你将通过遵循Apple的API本机实现它:在应用程序中安排通知,然后通过操作系统在本地接收通知,这将反过来允许你打开应用程序并执行可选的回调等...

One way to add Local Notifications support is by extending your application using a Cordova plug-in, which will allow you to run Native code.
This means that you will natively implement it by following Apple's APIs: to schedule the notification in the app and to then receive a notification locally via the OS, that will in turn allow you to open the app and execute an optional callback, etc...

你可以写一个自定义Cordova插件

查找现有内容网络上的插件


  • 将现有Cordova插件添加到Worklight时(取决于您的版本的Worklight和Cordova版本),此时的说明略有不同。

  • When adding an existing Cordova plug-in to Worklight (depending on your version of Worklight and version of Cordova), the instructions to do so are a bit different at this time.

此视频演示了如何添加的一个实例现有的Cordova插件:将Cordova插件集成到Worklight应用程序中

This video demonstrates one instance of how to do add an existing Cordova plug-in: Integrating Cordova plugins into Worklight applications