Skip to content

This guide provides a comprehensive overview of how to create and apply custom themes, provide verified session policies, and configure Apple App Site Association for iOS integration with the Cartridge Controller.

Creating a Theme

To create a theme, teams should commit their theme config to the configs folder in @cartridge/presets with the icon and banner included.

{
  "origin": "https://flippyflop.gg",
  "theme": {
    "colors": {
      "primary": "#F38332"
    },
    "cover": "cover.png",
    "icon": "icon.png",
    "name": "FlippyFlop"
  }
}

See an example pull request here

Verified Sessions

Session Policies can be provided in the preset configuration, providing a smoother experience for your users. In order to submit verified policies, create a commit with them to your applications config.json in @cartridge/presets.

For an example, see dope-wars:

{
  "origin": "dopewars.game",
  "policies": {
    "contracts": {
      "0x051Fea4450Da9D6aeE758BDEbA88B2f665bCbf549D2C61421AA724E9AC0Ced8F": {
        "name": "VRF Provider",
        "description": "Provides verifiable random functions",
        "methods": [
          {
            "name": "Request Random",
            "description": "Request a random number",
            "entrypoint": "request_random"
          }
        ]
      },
  ...
}

Apple App Site Association

The Apple App Site Association (AASA) configuration enables iOS app integration with Cartridge Controller, allowing for usage of Web Credentials (Passkeys) in native applications.

Configuration

To add your iOS app to the AASA file, include the apple-app-site-association section in your game's config.json:

JSON Configuration

{
  ...,
  "apple-app-site-association": {
    "webcredentials": {
      "apps": ["ABCDE12345.com.example.yourgame"]
    }
  },
  ...,
}