<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/AppStorage/init(wrappedValue:_:store:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10AppStorageV12wrappedValue_5storeACyAA20TabViewCustomizationVGAG_SSSo14NSUserDefaultsCSgtcAGRszlufc::OverloadGroup"
  },
  "title" : "init(wrappedValue:_:store:)"
}
-->

# init(wrappedValue:_:store:)

Creates a property that can save and restore tab sidebar customizations.

```
init(wrappedValue: Value = TabViewCustomization(), _ key: String, store: UserDefaults? = nil) where Value == TabViewCustomization
```

## Parameters

`wrappedValue`

The default value if the customization is not
available for the given key.

`key`

The key to read and write the value to in the user defaults
store.

`store`

The user defaults store to read and write to. A value
of `nil` will use the user default store from the environment.

## Discussion

You can set this customization on the TabView using
[`tabViewCustomization(_:)`](/documentation/SwiftUI/View/tabViewCustomization(_:)).

---

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)