# localResources

Register local resources so paywalls can load bundled media by resource ID.

Purpose [#purpose]

`localResources` maps resource IDs to local resources so paywalls can request bundled media with `swlocal://resource-id` instead of downloading them from a remote URL. Values can be file `URL`s or `UIImage`s from asset catalogs.

Signature [#signature]

```swift
public var localResources: [String: AssetResource]
```

Schema [#schema]

<TypeTable
  type="{
  key: {
    type: &#x22;String&#x22;,
    description: &#x22;The resource ID used in the paywall editor or in a `swlocal://resource-id` URL.&#x22;,
    required: true,
  },
  value: {
    type: &#x22;AssetResource&#x22;,
    description: &#x22;A local file `URL` from your app bundle or sandbox, or a `UIImage` from an asset catalog.&#x22;,
    required: true,
  },
}"
/>

Returns / State [#returns--state]

This is a mutable property on [`SuperwallOptions`](/docs/ios/sdk-reference/SuperwallOptions). Set it before calling [`configure()`](/docs/ios/sdk-reference/configure).

Related [#related]

* [Local Resources guide](/docs/ios/guides/local-resources)