> ## Documentation Index
> Fetch the complete documentation index at: https://help.fanaura.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Apple Music Integration

> Enable Apple Music presaves so fans can save your upcoming releases to their Apple Music library on release day.

Apple Music is the second-largest music streaming platform in the world, and many of your fans use it as their primary listening service. Fanaura's Apple Music integration ensures those fans can presave your upcoming releases, just like Spotify users can.

## What This Integration Does

* **Presaves**: Fans click "Pre-Save on Apple Music" on your smart link, authorize Fanaura, and your song is automatically added to their Apple Music library on release day.
* **Library additions**: When the song goes live on Apple Music, Fanaura uses MusicKit to add it to each fan's library.

## How Presaves Work

The Apple Music presave flow mirrors the Spotify experience, with a few platform-specific differences.

<Tabs>
  <Tab title="Fan Experience">
    <Steps>
      <Step title="Visit Smart Link">
        The fan visits your smart link (e.g., `fan.fanaura.com/your-slug/new-single`).
      </Step>

      <Step title="View Release">
        They see your release with artwork, song title, and release date.
      </Step>

      <Step title="Click Pre-Save">
        They click the **"Pre-Save on Apple Music"** button.
      </Step>

      <Step title="Authorize">
        An Apple Music authorization window opens. If the fan is not signed in, they will sign in with their Apple ID. They grant Fanaura permission to add content to their Apple Music library.
      </Step>

      <Step title="Confirmation">
        They see a confirmation: "Pre-save confirmed!" and are returned to your smart link.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Behind the Scenes">
    <Steps>
      <Step title="Token Exchange">
        When the fan authorizes, Fanaura receives a **MusicKit token** from Apple.
      </Step>

      <Step title="Secure Storage">
        This token is stored securely in Fanaura's database, linked to the fan's profile.
      </Step>

      <Step title="Release Day Execution">
        On **release day**, Fanaura uses the MusicKit API to add the song to the fan's Apple Music library.
      </Step>

      <Step title="Rewards">
        The presave is logged in the fan's activity timeline and earns them reward tokens (default: 25 tokens).
      </Step>
    </Steps>
  </Tab>
</Tabs>

### MusicKit Token Management

Apple Music uses MusicKit for authorization, which works differently from Spotify's OAuth:

* Tokens are generated during the fan's authorization.
* Fanaura manages token storage and refresh automatically.
* If a token becomes invalid (fan revoked access or account change), the presave fails gracefully and is logged.

## Setup

<Info>
  Apple Music integration is built into Fanaura at the platform level. There is no per-artist setup required -- no API keys to enter, no OAuth flow from your end. When you create a music asset and fans visit your smart link, the Apple Music presave option is available automatically.
</Info>

## Apple Music vs. Spotify Presaves

| Feature               | Spotify                           | Apple Music                     |
| --------------------- | --------------------------------- | ------------------------------- |
| Authorization         | Spotify OAuth                     | MusicKit token                  |
| What happens          | Song added to library             | Song added to library           |
| Fan requirement       | Spotify account (free or premium) | Apple Music subscription        |
| Token refresh         | Automatic via refresh token       | Managed by MusicKit             |
| Platform availability | All devices                       | All Apple devices + Android/web |

Both platforms deliver the same core experience for fans: authorize once, and the song appears in their library on release day.

<Warning>
  Apple Music presaves require the fan to have an active Apple Music subscription. Free Apple ID accounts without a subscription cannot add songs to their library.
</Warning>

## Supported Actions

Currently, the Apple Music integration supports:

* **Pre-save (add to library on release)**: The primary action. Fans authorize Fanaura to add your song to their library when it goes live on Apple Music.

Future capabilities may include:

* Playlist additions
* Listening data
* Enhanced analytics

## Using Apple Music Presaves in Your Marketing

### Promote Both Platforms

Not all fans use Spotify. By offering Apple Music alongside Spotify, you capture a wider audience:

* "Pre-save on Spotify OR Apple Music -- your choice!"
* Smart links automatically show both options (plus any other platforms you have enabled).
* Fans who presave on Apple Music are equally valuable to fans who presave on Spotify.

### Why Apple Music Presaves Matter

<Tip>
  **Algorithm signals.** First-day library additions on Apple Music signal to the platform that your song has demand, which can influence editorial playlist consideration.
</Tip>

<Info>
  **Broader reach.** In some markets (Japan, parts of Europe, many US households), Apple Music has significant market share. Missing these fans means leaving presaves on the table.
</Info>

<Note>
  **Fan data.** Every Apple Music presave goes through your Fanaura smart link, meaning you collect the fan's email and data regardless of which platform they choose.
</Note>

### Release Day

On release day, Fanaura executes Apple Music presaves alongside Spotify presaves:

* The song is added to each fan's Apple Music library automatically.
* No action is required from the fan -- they wake up and the song is there.
* The execution is logged, and you can see the total presave count by platform.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Pre-Save on Apple Music button not appearing">
    * Confirm your asset has a **future release date** set. Presave buttons only appear for unreleased music.
    * Verify that Apple Music is selected as a platform for the asset.
    * Check that your smart link is properly published.
  </Accordion>

  <Accordion title="Presave not executing on release day">
    * Ensure the release date in Fanaura matches your actual Apple Music release date.
    * Verify the ISRC is entered correctly -- Fanaura uses this to find the right song.
    * If the song was delayed or the release date changed, update the asset in Fanaura to match.
  </Accordion>

  <Accordion title="Fan says the song did not appear in their library">
    * The fan must have an active Apple Music subscription. Free Apple ID accounts cannot receive library additions.
    * The fan may have revoked Fanaura's authorization between presaving and release day.
    * Ask the fan to search for the song directly on Apple Music. In rare cases, library additions take a few hours to appear.
  </Accordion>

  <Accordion title="Authorization window does not open">
    * The fan may have pop-ups blocked in their browser. Advise them to allow pop-ups for your smart link domain.
    * On iOS devices, the authorization may open in-app instead of in the browser. This is normal behavior.
  </Accordion>
</AccordionGroup>

## Best Practices

<Tip>
  **Always offer Apple Music alongside Spotify.** Your smart links should include both options. Let fans choose their preferred platform.
</Tip>

<Tip>
  **Do not assume Spotify dominance.** In many demographics and regions, Apple Music is the primary platform. Do not ignore these fans.
</Tip>

<Note>
  **Track platform distribution.** After your presave campaign, review how many fans chose Spotify vs. Apple Music. This tells you where your audience lives and helps you allocate future marketing spend.
</Note>

<Warning>
  **Set accurate release dates.** The most common presave failure is a mismatched release date. Double-check that your Fanaura asset date matches your distributor's release schedule.
</Warning>

<Tip>
  **Include ISRC early.** Adding your ISRC to the asset before release day ensures Fanaura can find the correct song on Apple Music when it goes live.
</Tip>

## What Happens Next

Once Apple Music is set up (which is automatic), every new music asset you create with a future release date will offer Apple Music presaves on its smart link. Fans choose their platform, authorize the save, and Fanaura handles the rest. You focus on making music -- Fanaura handles the distribution on release day.
