Our app will launch automatically in the background,Doubt is the result of background fetch ,so we cancel the background modes setting of the background fetch,but we still can see the performFetchWithCompletionHandler method called when app launch in the background。Background launch will cause some bugs in our app. We don't want the app to start in the background. We hope to get help
app background launch unexpectedly
Oh my god, I have the same problem, can anyone help me?
Enabling background fetch capability requests the system to launch your app when possible. But there are other cases where the system may launch your app - for example when it believes that the user launch of your app is imminent.
In such cases, if the performFetchWithCompletionHandler() delegate method has been implemented, it will be called. If you don't want it called, you would want to remove that method from your app. Although, the app may still be launched in the background. So, the first thing to do is to fix the bugs in your app.
You may find it useful to read the article: https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app/about_the_app_launch_sequence
and especially pay attention to the section: Prepare Your App for Prewarming
At this time, there is no option to prevent this, and you would want to make sure that your app handles these conditions gracefully.