# The iOS paste prompt and deferred deep links: why "Allow Paste" appears and how to avoid it

> Why some apps show iOS's "Allow Paste" prompt on the first open after an install, how clipboard-based deferred deep links work, and the options that avoid the prompt, from detecting a link before reading to Apple's Paste button.

Source: https://straitlink.in/blog/ios-paste-prompt-deferred-deep-link/

You install an app from a link, open it for the first time, and before you see anything iOS asks: **"Hilltop Shoes" would like to paste from "Safari"**, with **Don't Allow Paste** and **Allow Paste**. Many people tap Don't Allow, some uninstall, and the app's deferred deep link quietly fails.

On a first open right after installing from a link, that prompt is often a deferred deep link reading the clipboard. This post explains why deferred linking on iPhone reaches for the clipboard at all, what changed in iOS, and the ways to get the person to the right screen without an alarming dialog on the first open.

## Why deferred links on iPhone touch the clipboard

A deferred deep link has one hard job: remember which link someone tapped, across an App Store install, so the app's first open can land on that screen.

On Android, Google built a carrier for that: the Play Install Referrer, a string that travels with the install and that the app reads back on its first open. We cover it in [Play Install Referrer deep links](https://straitlink.in/blog/play-install-referrer-deep-link-android/).

iOS has no equivalent. The App Store passes nothing from the web page to the app. So link services use one of two approaches:

1. **The clipboard.** The web page copies the link (or a token) to the clipboard before sending the person to the App Store. On first open, the app reads the clipboard and finds the link. Exact, when it works.
2. **A short-lived match.** The server notes a few coarse signals from the tap (network, screen size, language, time zone, iOS version) and compares them with the same signals sent by the app on its first open, within a short window. No clipboard, but it's a probability, not a certainty.

Firebase Dynamic Links used the clipboard by default: its iOS SDK read the pasteboard on first open, and Google documented an Info.plist key, `FirebaseDeepLinkPasteboardRetrievalEnabled`, to switch that off at the cost of less reliable deferred links. Branch's NativeLink copies the link when the person taps a button on Branch's page and checks the clipboard after install. Both are clipboard approaches.

## What iOS changed

Clipboard reads used to be silent. Apple changed that in two steps.

- **iOS 14** started showing a short banner whenever an app read the clipboard: "Hilltop Shoes pasted from Safari". Apps that read the clipboard on every launch were suddenly visible, and Firebase users filed bug reports about the banner showing at launch.
- **iOS 16** turned the banner into a question. An app that reads the clipboard programmatically now gets the **Allow Paste** prompt, unless the person pasted themselves (the Paste menu, a keyboard shortcut) or tapped Apple's system Paste button. From **iOS 16.1**, Settings has a per-app **Paste from Other Apps** choice of Ask, Deny or Allow, which appears once an app has asked.

So any SDK that reads the clipboard on the first open now shows a dialog at the worst possible moment: before the person has seen a single screen of your app.

## Four ways to handle it

### 1. Read the clipboard anyway

The prompt appears, the person decides, and if they allow it you get an exact match. It's simple, but it puts a system dialog in front of your onboarding, and a "Don't Allow" leaves you with nothing unless you have a fallback.

### 2. Check before you read

iOS lets an app ask what kind of content is on the clipboard without reading it. `UIPasteboard` can detect patterns such as a probable web URL, and that check doesn't show the prompt. If the clipboard doesn't hold a link, don't read it, and most people never see the dialog. Only someone who really came from a link page (and still has the link copied) is asked.

### 3. Let the person tap Apple's Paste button

Since iOS 16, `UIPasteControl` (and SwiftUI's `PasteButton`) puts a system-drawn Paste button in your UI. Tapping it is the consent, so iOS shows no prompt. You decide where it goes: a welcome screen that says "Continue where you left off" with a Paste button is clearer than a dialog nobody asked for. Branch offers a `BranchPasteControl` built on it.

### 4. Don't use the clipboard

Skip the clipboard and rely on the short-lived match, with an honest fallback when the match isn't certain: the app opens on its usual first screen. No prompt at all. The trade-off is precision. Two people on the same Wi-Fi with the same iPhone model, tapping different links within minutes, look alike, and a good matcher refuses to guess rather than send one of them to the other's screen.

## What Strait does

Strait uses option 4 by default and options 2 and 3 when you turn them on. Install matching is opt-in: the parts below are built, tested in code and proven on iPhone simulators, and the real-iPhone run waits on our App Store listing. Where it stands: [iPhone status](https://straitlink.in/iphone-status/).

- **No clipboard by default.** Taps on the **Get the app** page save a short-lived match: coarse signals, with the IP address kept only as a keyed hash. A tap can be matched for one hour, gives at most one match, and is refused when two taps look alike. You can switch matching off per workspace. Details: [How iPhone install matching works](https://straitlink.in/docs/iphone-install-matching/).
- **Optional clipboard boost.** It needs one switch, in the dashboard (**Settings → iPhone installs → Paste handoff**); the SDK reads it from our server on the first open, so it needs no app release. The **Get the app** button then also copies a one-time token link, stored only as a hash and valid once for 24 hours. (Update, October 2026: earlier SDKs also needed `clipboardBoost: true` in the app; that option is now deprecated and ignored, and device matching is off for new workspaces until you choose it.)
- **Detect first.** On the first open, the SDK first asks iOS whether the clipboard probably holds a web link. Only if it does does it read, and only then can iOS show the prompt. Anything that isn't a Strait handoff link stays on the phone.
- **Or a Paste button.** The iOS SDK includes `StraitPasteButton`, built on Apple's Paste button, so you can ask at a moment you choose with no system prompt.

```swift
// Nothing to set for the clipboard boost: turn on Paste handoff in the
// dashboard. With it off (the default), the SDK never touches the clipboard.
let strait = StraitLinks(StraitLinksConfig(
    publishableKey: "st_pub_live_…",
    endpoint: "https://hilltop.strait.link"
))
```

Check the [iOS SDK page](https://straitlink.in/docs/sdks/ios/) for the exact setup in your version, and the [React Native reference](https://straitlink.in/docs/sdks/react-native/reference/) for the same option there.

## Designing a Paste button screen

If you go with Apple's Paste button, the screen around it does the persuading, not iOS. A few things help:

- **Say what it's for.** "Pick up where you left off: paste the link you tapped" is clearer than a bare button. The person tapped **Get the app** a minute ago, so they recognise the idea.
- **Show it only when it can help.** Check first whether the clipboard probably holds a web link, and skip the screen when it doesn't. Most installs don't come from a link, and those people shouldn't see an extra step.
- **Make skipping easy.** A "Not now" that goes to your normal onboarding keeps the screen from feeling like a gate.
- **Ask once.** The handoff token works once and expires after a day, so there's nothing to gain from showing the screen on a later launch.

## Which should you choose?

- **Most apps:** no clipboard. The first open has no dialog, Android installs are exact through the Play Install Referrer anyway, and iPhone users who don't match get your normal onboarding.
- **Apps where landing on the exact item matters** (a referral reward, a shared cart, an invite to a private group): add the boost with detect-first, or put a Paste button on the welcome screen.
- **Apps migrating from Firebase Dynamic Links:** if your old setup showed the paste banner, check whether `FirebaseDeepLinkPasteboardRetrievalEnabled` was set. If you had turned it off, your users never saw the clipboard path, and the default here matches what they had.

Whatever you choose, describe it in your App Store privacy answers. The iPhone matching docs include a ready-made privacy label for the data the SDK handles.

## How to test it

1. Delete the app from the iPhone.
2. Tap your link in Safari and tap **Get the app**.
3. Install a build that has the same bundle ID (TestFlight works) and open it.
4. Watch the first open: with no boost there should be no prompt. With the boost and a copied link, you should see it once, or not at all if you use the Paste button.

The [Will it open my app?](https://straitlink.in/tools/will-it-open/) simulator shows what the link server does for each iPhone browser before you install anything.

## Sources and how we checked

- Firebase, [Receive Dynamic Links on iOS](https://firebase.google.com/docs/dynamic-links/ios/receive): the pasteboard use and the `FirebaseDeepLinkPasteboardRetrievalEnabled` key. The iOS 14 banner reports are in [firebase-ios-sdk issue 5893](https://github.com/firebase/firebase-ios-sdk/issues/5893).
- Branch, [NativeLink deferred deep linking](https://help.branch.io/using-branch/docs/nativelink-deferred-deep-linking) and [iOS SDK advanced features](https://help.branch.io/developer-hub/docs/ios-advanced-features): the copy-on-tap flow, the iOS 16 prompt and `BranchPasteControl`.
- Apple, [UIPasteControl](https://developer.apple.com/documentation/uikit/uipastecontrol) and [UIPasteboard](https://developer.apple.com/documentation/uikit/uipasteboard). The iOS 16.1 per-app setting is described in [Michael Tsai's write-up](https://mjtsai.com/blog/2022/10/21/ios-16-1-per-app-copy-and-paste-permissions/).
- Strait's behaviour is from its iOS and React Native SDK code and docs. Universal Links were tested on a real iPhone in October 2026; the paste handoff hasn't been run on a real iPhone yet.
