# iOS SDK customisation

An interactive tool that restyles the iOS payment sheet and previews it live in an Appetize device simulator running a real iOS app. This page is highly interactive — use the interactive version to adjust the theme and watch the simulator restyle in real time.

## What this page covers
- Three control tabs: Presets, Customise (colour pickers + shape sliders), and Code
- Colour controls for Primary, Background, Text, and Error
- Corner radius (0–24px) and border width (0–3px) sliders
- Generated Swift `PaymentSheet.Appearance` code you can copy
- A live iOS simulator (Appetize) with a device selector that restyles as you change values

## How it works

The preview embeds an `AppetizeSimulator` running a real iOS build (default device `iphone15pro`). Colour and shape values are passed to the simulator as parameters, and the embedded app restyles its payment sheet live. The simulator loads from an external service, so it can take several seconds to appear.

Built-in mobile presets (from `mobilePresets`): Default (Peach orange), Dark Mode, Branded Blue, Branded Purple, Minimal. Each defines `primary`, `background`, `text`, and `error` colours.

The Code tab generates Swift like:
```swift
import HyperswitchSDK
import UIKit

func createAppearance() -> PaymentSheet.Appearance {
    var appearance = PaymentSheet.Appearance()

    // Colors
    appearance.colors.primary = UIColor(hex: "#ec5228")!
    appearance.colors.background = UIColor(hex: "#FFFFFF")!
    appearance.colors.text = UIColor(hex: "#000000")!
    appearance.colors.danger = UIColor(hex: "#C91C00")!

    // Corner radius
    appearance.cornerRadius = 12

    // Border width
    appearance.borderWidth = 1

    return appearance
}
```

## Related
- [iOS SDK](/sdk-mobile-ios.md): full integration and the `PaymentSheet.Appearance` API
- [Android SDK customisation](/sdk-customization-android.md): the Android equivalent
- [Web SDK customisation](/sdk-customization.md): the web equivalent (live SDK preview)
- [Testing](/docs/testing.md): test cards and sandbox guidance

---

Interactive version: https://playground.peachpayments.com/sdk-customization/ios
