Skip to content

Yoink for iOS

Yoink for iPad and iPhone is a shelf app for collecting files and snippets on iPad and iPhone. Protocol Launcher allows you to generate official Yoink for iOS URL scheme actions.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Notes

This module only wraps the URL scheme actions documented in Yoink for iPad and iPhone Usage Tips: pastefromclipboard, copytoclipboard, showdownloadui, downloadurl, and addstring.

The official page documents x-success and x-error callback parameters for the scheme. showdownloadui does not accept callbacks because Yoink states that this action does not call back to the calling app.

The official page shows its generic format as yoink://[action]..., while every concrete action example uses yoinkios://...; this module follows those concrete action examples.

URL Methods

Paste From Clipboard

Paste the current clipboard contents into Yoink.

On-Demand
ts
import { pasteFromClipboard } from 'protocol-launcher/yoink-ios'

const url = pasteFromClipboard({
  title: 'My Title',
  createStack: 0,
})

Copy To Clipboard

Copy an item from Yoink to the clipboard by index. In Yoink, 0 is the topmost item.

On-Demand
ts
import { copyToClipboard } from 'protocol-launcher/yoink-ios'

const url = copyToClipboard({
  index: 0,
})

Show Download UI

Show Yoink's download UI.

On-Demand
ts
import { showDownloadUi } from 'protocol-launcher/yoink-ios'

const url = showDownloadUi()

Download URL

Download a URL in Yoink.

On-Demand
ts
import { downloadUrl } from 'protocol-launcher/yoink-ios'

const url = downloadUrl({
  url: 'https://eternalstorms.at/yoink/Yoink.zip',
})

Add String

Save a string in Yoink.

On-Demand
ts
import { addString } from 'protocol-launcher/yoink-ios'

const url = addString({
  string: 'Yoink is available on\u0002iOS and macOS',
  title: 'Yoink Availability',
})

Generated URLs

ts
pasteFromClipboard(pasteFromClipboardParams)
// => 'yoinkios://pastefromclipboard?title=My%20Title&createStack=0'

copyToClipboard(copyToClipboardParams)
// => 'yoinkios://copytoclipboard?index=0'

showDownloadUi()
// => 'yoinkios://showdownloadui'

downloadUrl(downloadUrlParams)
// => 'yoinkios://downloadurl?url=https%3A%2F%2Feternalstorms.at%2Fyoink%2FYoink.zip'

addString(addStringParams)
// => 'yoinkios://addstring?string=Yoink%20is%20available%20on%02iOS%20and%20macOS&title=Yoink%20Availability'

Official Documentation