Skip to main content

Use LLMs to implement Adapty

You can use large language models (LLMs) to help you integrate Adapty into your app. We provide a set of tools and best practices if you use LLMs during development.

Plain text docs

You can access all of our documentation as plain text Markdown files by adding .md to the end of any URL or clicking View as Markdown under article titles. To copy the whole Markdown content immediately, click Copy for LLM. For example, you can find the plain text version of this page itself at https://adapty.io/docs/adapty-cursor.md.

This helps AI tools and agents consume our content and allows you to copy and paste the entire contents of a doc into an LLM. This format is preferable to scraping or copying from our HTML and JavaScript-rendered pages because:

  • Plain text contains fewer formatting tokens.
  • Content that isn't rendered in the default view (for example, it's hidden in a tab) of a given page is rendered in the plain text version.
  • LLMs can parse and understand markdown hierarchy.

We also host the llms.txt file which instructs AI tools and agents how to retrieve the plain text versions of our pages. The /llms.txt file is an emerging standard for making websites and content more accessible to LLMs. Note that for some AI agents (e.g., ChatGPT) you will need to download llms.txt and upload it to the chat as a file.

tip

Additionally, we host llms-full.txt. The llms-full.txt file combines the entire Adapty documentation site into a single file as context for AI tools and is indexed by LLM traffic.

Tips for prompting with Claude, ChatGPT, or Gemini

If you’re using Claude Code, run the init command after launching the Code CLI so Claude can analyze your codebase. This helps it get oriented and provide better advice once you start asking questions.

If you plan to integrate the Adapty SDK into your iOS project (using either UIKit or SwiftUI), install the Adapty libraries using something like Swift Package Manager before you start working with the LLM. It will allow you to get into the code integration quicker if this step is already done.

Here are some helpful additions to your prompts that should make working with the LLM that much easier:

  • If migrating from a native IAP implementation or something like RevenueCat:
Help me migrate from [existing implementation technique] to Adapty for handling in-app purchase subscriptions, including presenting Paywall Builder paywalls. Build a migration plan, but don’t implement it until you’ve shown me for review.
  • If using something like SwiftUI:
This app uses SwiftUI for its interface, so use a native SwiftUI implementation for displaying and handling paywalls wherever applicable.

Use with Cursor

Cursor, the AI code editor, makes it easier to integrate and maintain apps with Adapty's infrastructure. This guide shows you how to configure Cursor for better results when working with Adapty's SDK.

Add Adapty documentation to Cursor

Adding Adapty's documentation directly to Cursor means you don't have to switch between your code editor and browser. This setup gives you quick access to the latest implementation guides and best practices while coding.

To add Adapty documentation to Cursor:

  1. In Cursor, go to Settings > Cursor settings. Switch to Indexing & Docs.
  2. Click Add doc.
  3. Enter the URL https://adapty.io/docs.
  4. Name the documentation Adapty Docs and click Confirm to save it.

Add Adapty SDKs to Cursor

For platform-specific development, we recommend adding the GitHub repositories for the Adapty SDKs you're using. This gives you access to the latest code examples, changelogs, and implementation details.

Follow the same process as above, but use the relevant SDK repository URL:

  • iOS SDK: https://github.com/adaptyteam/AdaptySDK-iOS
  • Android SDK: https://github.com/adaptyteam/AdaptySDK-Android
  • Flutter SDK: https://github.com/adaptyteam/AdaptySDK-Flutter
  • React Native SDK: https://github.com/adaptyteam/AdaptySDK-React-Native
  • Unity SDK: https://github.com/adaptyteam/AdaptySDK-Unity

Name each doc Adapty <Platform> SDK (e.g., Adapty Flutter SDK).

Reference Adapty in your prompts

Once configured, you can reference Adapty documentation and SDKs using the @ symbol in your prompts. This makes sure Cursor uses current and accurate information when generating code.

Example prompts:

  • @Adapty Docs help me install the Adapty SDK
  • Using @Adapty Flutter SDK, show me how to handle purchase restoration with proper error handling
  • @Adapty Docs @Adapty iOS SDK help me show a paywall created in the paywall builder