If you use UIBackgroundTaskIdentifier for your background task like long download that i did. When the phone is off or the phone is screen lock, the app will crash if it's longer than 3 minutes or limited time. You can find detail on https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html . This is the explanation from apple why they limit our background task. Always try to avoid doing any background work unless doing so improves the overall user experience. An app might move to the background because the user launched a different app or because the user locked the device and is not using it right now. In both situations, the user is signaling that your app does not need to be doing any meaningful work right now. Continuing to run in such conditions will only drain the device’s battery and might lead the user to force quit your app altogether. So be mindful about the work you do in t...