Skip to content

[PSA] Starting with Xcode 27 (And iOS27) you MUST use the Scene life cycle #26837

Description

@JPZV

Apple platform

iOS

Framework version

net10.0-*

Affected platform version

Xcode27 with iOS27

Description

Recommendations for the developers

#23058 already talked about Apple requesting the devs to use the UIScene life cycle, with iOS26, but that was a warning actually. From now on, starting with iOS27, the app will crash in both iPhone/iPad and Simulators running iOS27 if you're still using the old AppDelegate life cycle.

Currently the New App template from VS2026 still uses the old method. I don't know if this has to be updated from macios team, from maui team, or from VS team, but if your app is crashing or you're gettings users report about the app crashing at start, then you should look if you have the UIScene delegate (which is pretty simple to do):

  1. You have to create the following file: [ProjectFolder]/Platforms/iOS/SceneDelegate.cs and add this:
using Foundation;
using Microsoft.Maui.Platform;
using System;
using System.Collections.Generic;
using System.Text;
using UIKit;

namespace [ProjectNamespace].Platforms.iOS
{
    [Register("SceneDelegate")]
    public class SceneDelegate : MauiUISceneDelegate
    {
    }
}
  1. Add the following in your info.plist:
    <key>UIApplicationSceneManifest</key>
    <dict>
        <key>UIApplicationSupportsMultipleScenes</key>
        <true/>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UIWindowSceneSessionRoleApplication</key>
            <array>
                <dict>
                    <key>UISceneConfigurationName</key>
                    <string>__MAUI_DEFAULT_SCENE_CONFIGURATION__</string>
                    <key>UISceneDelegateClassName</key>
                    <string>SceneDelegate</string>
                </dict>
            </array>
        </dict>
    </dict>
  1. If you're targeting iOS 12 (or even below), don't delete the AppDelegate.cs. If you're targeting iOS13 or above, then you could delete AppDelegate.cs though it's not actually necessary as the app will launch the best Life cycle method according to the device.

  2. Fully Clear and rebuild your solution (just in case). Remember to delete both obj/bin after running the clean command.

Recommended actions for the maintainers

  • Mark MauiUIApplicationDelegate as deprecated in favor of MauiUISceneDelegate
  • Update the iOS template to follow the above instructions
  • Optional: Create a note/PSA/documentation about a native iOS crash with the error ___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption_block_invoke. Below is an example about the mentioned exception.

Steps to Reproduce

  1. Create a new .Net MAUI App project
  2. Check if the file [ProjectFolder]/Platforms/iOS/SceneDelegate.cs exists. If it does, then the issue was resolved at least with the New App Template. If you want to reproduce the issue, delete that file and the UIApplicationSceneManifest in info.plist
  3. Build, Deploy and Launch the app in a iOS27+ Device or simulator
  4. The app will try to launch and it will exit immediately. VIsual Studio will not recognize the crash while the Mac Host will say the app crashed and will show a native exception report.
  5. Build, Deploy and Launch the app in a -iOS26 Device or Simulator, and the app will run as it should be even with the same SDK/Environment.

Did you find any workaround?

Create SceneDelegate.cs file and add UIApplicationSceneManifest to the info.plist as mentioned above

Relevant logs

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process:             [App] [19905]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/3CD0E5ED-047E-497E-93FE-236D9D7E2B8F/data/Containers/Bundle/Application/FCD945C3-C1C8-4EE0-A08C-4416BD7EC965/[App].app/[App]
Identifier:          com.example.app
Version:             1.0.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [19702]
Coalition:           com.apple.CoreSimulator.SimDevice.3CD0E5ED-047E-497E-93FE-236D9D7E2B8F [3411]
Responsible Process: SimulatorTrampoline [3387]
User ID:             502

Date/Time:           2026-10-02 10:03:52.7221 -0700
Launch Time:         2026-10-02 10:03:48.0177 -0700
Hardware Model:      Mac18,5
OS Version:          macOS 27.0.1 (26A434)
Release Type:        User

Crash Reporter Key:  074E83F2-51A1-5F2D-4230-30F4E11D5BA4
Incident Identifier: DB125CAE-92E9-4FCD-B9E0-383F3AF8A453

Time Awake Since Boot: 7600 seconds

System Integrity Protection: enabled

Triggered by Thread: 0  tid_103, Dispatch Queue: com.apple.main-thread

Exception Type:    EXC_BREAKPOINT (SIGTRAP)
Exception Codes:   0x0000000000000001, 0x00000001c48c336c

Termination Reason:  Namespace SIGNAL, Code 5, Trace/BPT trap: 5
Terminating Process: exc handler [19905]


Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread
0   UIKitCore                     	       0x1c48c336c ___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption_block_invoke + 712
1   libdispatch.dylib             	       0x1e6435fb8 _dispatch_client_callout + 12
2   libdispatch.dylib             	       0x1e641dfa0 _dispatch_once_callout + 28
3   UIKitCore                     	       0x1c48e5010 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 320
4   UIKitCore                     	       0x1c4312c20 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 260
5   FrontBoardServices            	       0x1e284e108 __95-[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:]_block_invoke + 304
6   FrontBoardServices            	       0x1e284e608 -[FBSScene _callOutQueue_maybeCoalesceClientSettingsUpdates:] + 116
7   FrontBoardServices            	       0x1e284df78 -[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:] + 392
8   FrontBoardServices            	       0x1e28b26e4 __93-[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:]_block_invoke.282 + 216
9   FrontBoardServices            	       0x1e285b230 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 160
10  FrontBoardServices            	       0x1e2875408 -[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:] + 392
..........

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions