Installing app from the App Store, app is automatically launched into the background

We have noticed recently that when our app is installed from the App Store, it is automatically launched into the background.

After the App Store installs our app, it is started into the background (no UI) without the user pressing ‘Open’ from the App Store or tapping the app icon in the home screen.

Testing with iOS 15.

I assume this is not the correct behavior, an app automatically being launched after being installed. I submitted a bug report (FB9971657), but wanted to know if anyone else was seeing this behavior.

This sounds like you are experiencing an app-prewam in the background. Starting in early iOS 15, an existing feature (app pre-warm) was enhanced to improve app launch times by predicting when you would interact with an app, and launching it into memory from the background. An unintended side effect of this is that it collided with specific app features like loading assets from the Keychain and from UserDefaults. The frequency in which app pre-warm interacts with an app in the background has since been lowered, but if you are testing on iOS 15.0 - 15.2 you could check for app pre-warm by taking a look at your system logs. If you see something like this:

default  10:33:14.663970+0800  runningboardd  Executing launch request for 
application<com.your.app.bundle.id> (DAS Prewarm launch)

while running in the background, then this is a strong indication that your app was pre-warmed. Add this information to your bug report if you find these logs in the system log.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

Console log of install and launch

===========================================================================> Installing App

MobileInstallation	16:46:54.571979-0500	SpringBoard	com.ourApp.client.main:5:8:3:1:applicationsDidInstall <LSApplicationProxy: 0x28284b240> com.ourApp.client.main <com.ourApp.client.main <installed >:0>
FrontBoardServices	16:46:54.572021-0500	SpringBoard	-[FBSApplicationLibrary applicationsDidInstall:] com.ourApp.client.main
FrontBoardServices	16:46:54.572985-0500	SpringBoard	Removing placeholder com.ourApp.client.main for reason "App install (placeholder complete)"
FrontBoardServices	16:46:54.573025-0500	SpringBoard	Notifying observers of applications added: ("<SBApplicationInfo: 0x107c87040; com.ourApp.client.main (ourApp); sdk: 15.0>")
MobileInstallation	16:46:54.573288-0500	SpringBoard	com.ourApp.client.main:10:4:1:1:Placeholder remove BEGIN
MobileInstallation	16:46:54.573760-0500	SpringBoard	com.ourApp.client.main:10:10:3:1:Application added
SpringBoard					16:46:54.597203-0500	SpringBoard	AutoLaunching application for install: <SBApplication: 0x2824340e0; com.ourApp.client.main> {}

CoreServices				16:46:54.599904-0500	SpringBoard	Best binding found for evaluator 0x16d4ee250: ourApp (B:0x3f0, C:0x0)
SplashBoard					16:46:54.600615-0500	SpringBoard	acquireManifestForContainerIdentity:store:creatingIfNecessary: Created manifest: <XBApplicationSnapshotManifestImpl: 0x283224780; bundleID: com.ourApp.client.main>.
SplashBoard					16:46:54.600825-0500	SpringBoard	com.ourApp.client.main Manifest is empty; purging everything at <private>
SplashBoard					16:46:54.601011-0500	SpringBoard	<XBApplicationSnapshotManifestImpl: 0x283224780> [com.ourApp.client.main] Incrementing client count: 1
Security						16:46:54.601068-0500	SpringBoard	open(/private/var/containers/Bundle/Application/CE0D5485-93A8-4715-9F22-8B617C0FA1D6/ourApp.app/ourApp,0x0,0x1b6) = 33
Security						16:46:54.601135-0500	SpringBoard	open(/private/var/containers/Bundle/Application/CE0D5485-93A8-4715-9F22-8B617C0FA1D6/ourApp.app/ourApp,0x0,0x1b6) = 34
Security						16:46:54.601377-0500	SpringBoard	317003 signing bytes in 6 blob(s) from /private/var/containers/Bundle/Application/CE0D5485-93A8-4715-9F22-8B617C0FA1D6/ourApp.app/ourApp(arm64)
SplashBoard					16:46:54.601742-0500	SpringBoard	<XBApplicationSnapshotManifestImpl: 0x283224780> [com.ourApp.client.main] Decrementing client count: 0
Security						16:46:54.602200-0500	SpringBoard	open(/private/var/containers/Bundle/Application/CE0D5485-93A8-4715-9F22-8B617C0FA1D6/ourApp.app/Info.plist,0x0,0x1b6) = 35
CoreFoundation			16:46:54.602894-0500	SpringBoard	Resource lookup at <private>

SplashBoard					16:46:54.603584-0500	SpringBoard	<XBApplicationSnapshotManifestImpl: 0x283224780> [com.ourApp.client.main] Incrementing client count: 1
SplashBoard					16:46:54.603744-0500	SpringBoard	<XBApplicationSnapshotManifestImpl: 0x283224780> [com.ourApp.client.main] Incrementing client count: 2


===========================================================================> Launching App

FrontBoard					16:46:54.604556-0500	SpringBoard	Asked to bootstrap a new process with identity: application<com.ourApp.client.main>
FrontBoard					16:46:54.604602-0500	SpringBoard	Creating process (sync=true) with identity: application<com.ourApp.client.main>
FrontBoard					16:46:54.604662-0500	SpringBoard	Created <FBWorkspace: 0x282a77e90; application<com.ourApp.client.main>>
FrontBoard					16:46:54.604707-0500	SpringBoard	Bootstrapping application<com.ourApp.client.main> with intent background
RunningBoard				16:46:54.606441-0500	runningboardd	Acquiring assertion targeting application<com.ourApp.client.main> from originator [daemon<com.apple.SpringBoard>:61] with description 
RunningBoard				16:46:54.606486-0500	runningboardd	Assertion 32-61-1421 (target:application<com.ourApp.client.main>) will be created as active
RunningBoard				16:46:54.606554-0500	runningboardd	Executing launch request for application<com.ourApp.client.main> (FBApplicationProcess)
RunningBoard				16:46:54.606604-0500	runningboardd	Creating and launching job for: application<com.ourApp.client.main>
RunningBoard				16:46:54.606667-0500	runningboardd	_mutateContextIfNeeded called for com.ourApp.client.main
CoreServices				16:46:54.607723-0500	runningboardd	Best binding found for evaluator 0x16b7fe230: ourApp (B:0x3f0, C:0x0)
RunningBoard				16:46:54.608427-0500	runningboardd	BEGIN suppressing state updates for application<com.ourApp.client.main>
RunningBoard				16:46:54.613807-0500	runningboardd	Adding assertion 32-61-1421 (target:application<com.ourApp.client.main>)
RunningBoard				16:46:54.615094-0500	runningboardd	Incrementing suppression state to 1 for application<com.ourApp.client.main>
RunningBoard				16:46:54.619230-0500	runningboardd	SUPPRESSING state update for application<com.ourApp.client.main>:
RunningBoard				16:46:54.619482-0500	runningboardd	Incrementing suppression state to 2 for application<com.ourApp.client.main>
RunningBoard				16:46:54.619658-0500	runningboardd	application<com.ourApp.client.main> is now targeted by 1 assertions
RunningBoard				16:46:54.619824-0500	runningboardd	No personas found for bundle identifier: com.ourApp.client.main
RunningBoard				16:46:54.619982-0500	runningboardd	Updating events for assertion: 32-61-1421 (target:application<com.ourApp.client.main>)
RunningBoard				16:46:54.620040-0500	runningboardd	Removing events for context: 32-61-1421 (target:application<com.ourApp.client.main>)
RunningBoard				16:46:54.620093-0500	runningboardd	Enqueueing events for assertion: 32-61-1421 (target:application<com.ourApp.client.main>)
Installing app from the App Store, app is automatically launched into the background
 
 
Q