ios-share-extension
Installation
SKILL.md
iOS Share Extension (Convex + Clerk)
Add a "Save to " target to the iOS share sheet that saves the shared link/text through the same authenticated backend path the app already uses — no new server endpoint, no re-login. The extension reuses the app's Clerk session and calls a Convex action as the signed-in user.
The model (read this first)
An iOS Share Extension is a separate process with its own bundle id, its own entitlements, and its own signed-in state. It does NOT inherit the host app's keychain or network session for free. Two bridges make it work:
- Shared Clerk session via a keychain access group — so the extension reads the app's login and calls Convex as that user. This is the part everyone gets wrong (see the gotcha below).
- Shared save-queue via an App Group
UserDefaults— so a save that can't reach the network (offline, cold extension) is never lost; the host app drains the queue when it next becomes active.