In my application, I have created NSTimer event that gets triggered every 5 minutes, nevertheless, it's in the background or foreground. The application will check for local content in DB & check if it is required to Sync. The applications work as expected in debug mode, on both simulator & device.
However, when I create a Release build, the NSTimer task, stops the firing task in the background. Would like to know the cause of this behavior in Xamarin.IOS?
NSTimeris not allowed to run in background if you do not enable any background mode , the system will suspend your app shortly after it moves to the background.However there are several options for refreshing content in the background
Region Monitoring and Significant Location Changes Service
Background Fetch (iOS 7+)
Remote Notifications (iOS 7+)
Refer to
https://developer.apple.com/forums/thread/127444
https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/backgrounding/ios-backgrounding-techniques/updating-an-application-in-the-background