crossbind
GitHub
← All extensions

activities

Handoff on iOS and macOS, for the user activities the page sets and continues.

Package @crossbind/extension-activitiesnpm ↗Source ↗

An app has it by having @crossbind/core-app-host, which lists it as a dependency: there is nothing to install or list.

Use

JavaScript
import { app, events } from 'crossbind/app';
 
await app.setUserActivity({ type: 'com.example.notes.edit', userInfo: { id: 7 } });
events.on('user-activity', ({ type, userInfo }) => open(type, userInfo));

Options

app.activityTypes lists the types of user activities the app sets and continues, as ['com.example.notes.edit']. The app has this extension only where a type is listed.

Platforms

iOS and macOS. Elsewhere app.setUserActivity rejects.

Replace or leave out

It holds the role activities. An extension that gives replaces: 'activities' takes it; app: { without: ['activities'] } in crossbind.config.js leaves it out. Leaving it out while app.activityTypes is set stops the build. The guide shows how, and extensions.md what a replacement answers.

app.md has the rules of a type.

Type to search every guide page and section.
↑↓ navigate↵ openesc close