<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISceneConfiguration/init(name:sessionRole:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISceneConfiguration(im)initWithName:sessionRole:"
  },
  "title" : "init(name:sessionRole:)"
}
-->

# init(name:sessionRole:)

Creates a scene-configuration object with the specified role and app-specific name.

```
init(name: String?, sessionRole: UISceneSession.Role)
```

## Parameters

`name`

The app-specific name you want to assign to the scene. For scenes you specify in your Info.plist file, this value corresponds to the string assigned to the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UIApplicationSceneManifest/UISceneConfigurations/UIWindowSceneSessionRoleApplication/UISceneConfigurationName> key.

`sessionRole`

The role of the scene. For a list of possible roles, see [`UISceneSession.Role`](/documentation/UIKit/UISceneSession/Role-swift.struct).

## Return Value

A new scene-configuration object.

## Discussion

After creating a scene-configuration object, supply values for the [`sceneClass`](/documentation/UIKit/UISceneConfiguration/sceneClass), [`delegateClass`](/documentation/UIKit/UISceneConfiguration/delegateClass), and [`storyboard`](/documentation/UIKit/UISceneConfiguration/storyboard) properties.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)