Yes, your understanding is right! Let me explain more deeply!
Background task is the ability to work continue in background.
For example if you are playing audio
and you press home button then audio can continue play in background. same for location! you can continuously update location in background. This is just example there is many more type that works in background. You can say this kind of stuff as background task. A task that can continue work in background mode called background task.
You can refer Apple doc to know which kind of background tasks you can perform or allowed by iOS. Now background fetch
is totally different thing. It is ability to check for new content or perform operation periodically if your application is in background or in inactive state
. System automatically wake up your app in background when it is possible and can perform some operation. For example you can say facebook
. Facebook have timeline which should have new data periodically, so it can use background fetch to fetch data from server, no matter if application is inactive! So, when user open the application he/she can get best user experiance because content are already downloaded by background fetch
!
You can refer Apple doc for background fetch! It states,
Apps that need to check for new content periodically can ask the system to wake them up so that they can initiate a fetch operation for that content. To support this mode, enable the Background fetch option from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the fetch value in your app’s Info.plist file.) Enabling this mode is not a guarantee that the system will give your app any time to perform background fetches. The system must balance your app’s need to fetch content with the needs of other apps and the system itself. After assessing that information, the system gives time to apps when there are good opportunities to do so.