Repository: flutter
Issue: Extended delay on Splash Screen when opening application during Downtime on iOS 16.6
Labels: platform-ios,has reproducible steps,P3,team-ios,triaged-ios,found in release: 3.13,found in release: 3.14

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Use any flutter application currently installed on an iOS device running iOS 16.6+
2. Turn on the [Screen Time](https://support.apple.com/en-us/HT208982#:~:text=Screen%20Time%20gives%20you%20a,All%20Activity%20under%20the%20graph.) feature on iOS and turn on Downtime to ensure that it's blocking your Flutter application. To be sure your app will be blocked, you can choose to block _all_ applications (except OS-default-exempt ones) by going to Downtime and tapping and enabling the Block at Downtime Switch and then tapping Turn On Downtime Until Tomorrow **(Figure 1).**
3. Ensure the Flutter application's process is not running. To be sure, force quit the application.
4. Launch the Flutter application and ensure the Screen Time screen is shown (if it's not, your app has not been blocked and you should go back to Step 2).
5. Tap any button that attempts to continue launching the application (anything other than OK) and proceed to the application.
6. Note the delayed hang on the Splash screen that is _not_ present when launching the application outside of Downtime restrictions **(Figure 2).**

**Figure 1**

Screen used to enable **Block at Downtime**, which is _optional_ but an easy way to ensure all apps are blocked immediately.

<img src="https://github.com/flutter/flutter/assets/8343465/3ca67138-13be-4726-802f-3b664a419ae0" width="300"/>

**Figure 2**

In this video, you'll see the user opening 2 Flutter applications (Wonderous and eBay Motors) normally outside of Downtime restriction. Then, Downtime is turned ON and the apps are restarted and experience the prolonged startup delay.

https://github.com/flutter/flutter/assets/8343465/c5c62bb7-90a0-4774-87bd-7155ea7f16f6


### Expected results

The launch time experienced when launching the application _within_ Downtime restrictions should be the same as when launched _outside_ the restrictions.

### Actual results

This has been described in the **Steps to reproduce** section.

| Device  | OS Version | Did Reproduce |
| ------------- | ------------- | ------------- |
| iPhone 13 mini  | 16.6  | ✅   |
| iPhone 14 Pro*  | 16.1.1  | ❌   |
| iPhone 14 Pro*  | 16.6  | ✅   |

_*Note that these are the same device, and this likely proves that this started happening on a certain iOS version_

### Code sample

I'll be happy to update this issue with a `flutter create bug` project but I think it's probably even easier to reproduce using literally any Flutter application on the App Store (see video in **Steps to reproduce**). If the team still feels it worth the time, I'll update this post.

### Screenshots or Video

See **Steps to reproduce** section. I have other videos as well if needed.

### Logs

N/A

### Flutter Doctor output

**Note:** I'm adding these details from _my_ local machine, but as mentioned several times, I believe this should be reproducible on many different setups.

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.10.3, on macOS 13.5 22G74 darwin-arm64, locale en-US)
    • Flutter version 3.10.3 on channel stable at /Users/brandontrautmann/fvm/versions/3.10.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f92f44110e (3 months ago), 2023-06-01 18:17:33 -0500
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/brandontrautmann/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_SDK_ROOT = /Users/brandontrautmann/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio Chipmunk.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0
```

</details>