[英]PerformFetch is never called
我正在尝试在xamarin.ios应用程序中实现后台获取,尽管启用了后台获取,但从未得到过调用。
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// tried this also
// UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);
UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(60);
// Other code
}
public override async void PerformFetch(UIApplication application, Action<UIBackgroundFetchResult> completionHandler)
{
Console.WriteLine("Perform fetch called..!!");
var result = await FetchImage("https://www.xamarin.com/content/images/pages/branding/assets/xamagon.png");
completionHandler(result);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.