How to do background task functionality in IOS using Xamarin.forms

pdattu123pdattu123 Member ✭✭

Actually I am trying to background task functionality so I written code as follows..

MINIMUM_BACKGROUND_FETCH_INTERVAL=10;
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 completionHandler)
{
base.PerformFetch(application, completionHandler);
Helper.Value = DateTime.Now.ToShortDateString();
}

but set MINIMUM_BACKGROUND_FETCH_INTERVAL 10 sec; after 10 sec this PerformFetch is not calling ... please tell me how to resolve this issue..

Thanks,

Sign In or Register to comment.