我正在使用科多瓦-插件-背景模式插件的Ionic应用程序运行我的应用程序在后台和执行一些任务。
--我已经在安卓系统上实现了这一目标,并取得了良好的效果.
但在IOS上,我无法使用后台模式,因为它为我的应用程序提供了精确30秒的后台运行时间,并在此之后杀死了应用程序。为了防止这种情况,我使用科多瓦-插件-背景-获取插件。
问题是上面写着
初始化后台提取错误- "plugin_not_installed“
但是“离子插件”说已经安装好了..。
我的代码:
const config: BackgroundFetchConfig = {
stopOnTerminate: false, // Set true to cease background-fetch from operating after user "closes" the app. Defaults to true.
};
backgroundFetch.configure(config)
.then(() => {
console.log('Background Fetch initialized');
this.backgroundFetch.finish();
})
.catch(e => console.log('Error initializing background fetch', e))发布于 2019-01-30 19:52:28
您必须用backgroundFetch => BackgroundFetch编写
我的守则:
BackgroundFetch.configure(fetchCallback, failureCallback, {
minimumFetchInterval: 15,
});https://stackoverflow.com/questions/53228049
复制相似问题