我已经为后台任务功能编写了代码。但无法执行PerformFetch方法。
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(MINIMUM_BACKGROUND_FETCH_INTERVAL);
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
public override void PerformFetch(UIApplication application, Action<UIBackgroundFetchResult> completionHandler)
{
base.PerformFetch(application, completionHandler);
Helper.Value = DateTime.Now.ToShortDateString();
}