npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tauri-plugin-ios-bookmark-api

v0.1.1

Published

TypeScript API for tauri-plugin-ios-bookmark

Readme

tauri-plugin-ios-bookmark

iOS security-scoped bookmark plugin for Tauri 2.

This plugin provides a native bridge for opening files from the iOS Files app, creating persistent security-scoped bookmarks, reading bookmarked files later, and forgetting saved bookmarks.

This crate is intended for Tauri 2 mobile apps that target iOS. The Rust crate registers the native plugin, while the guest JavaScript API exposes a small command surface for your frontend.

Features

  • pickAndBookmark: presents UIDocumentPickerViewController, reads the file, and returns a bookmark identifier plus file metadata
  • readByBookmark: resolves a previously saved bookmark and reads the file again
  • forgetBookmark: removes a stored bookmark

Package Layout

  • src/: Rust plugin entrypoints and mobile bridge
  • ios/: Swift implementation for the iOS native plugin
  • guest-js/: TypeScript guest API entrypoint
  • permissions/: default Tauri permission definitions

Install

Add the Rust crate to your Tauri app:

cargo add tauri-plugin-ios-bookmark

Install the guest JavaScript API in your frontend package:

npm install tauri-plugin-ios-bookmark-api

The guest package expects @tauri-apps/api from your Tauri application.

Rust Setup

Register the plugin in your Tauri builder:

fn main() {
    tauri::Builder::default()
    .plugin(tauri_plugin_ios_bookmark::init())
    .run(tauri::generate_context!())
    .expect("error while running tauri application");
}

JavaScript Usage

The guest API exposes three commands:

import {
    forgetBookmark,
    pickAndBookmark,
    readByBookmark,
} from 'tauri-plugin-ios-bookmark-api'

const picked = await pickAndBookmark()
const targetedPick = await pickAndBookmark({
    targetPath: '/docs/related.md',
})

console.log(picked.bookmarkId)
console.log(picked.fileName)
console.log(picked.filePath)
console.log(picked.content)

console.log(targetedPick.bookmarkId)

const reread = await readByBookmark(picked.bookmarkId)
console.log(reread.fileName)
console.log(reread.content)

await forgetBookmark(picked.bookmarkId)

pickAndBookmark() returns:

type PickBookmarkRequest = {
    targetPath?: string
    suggestedFileName?: string
}

type PickResult = {
    bookmarkId: string
    fileName: string
    filePath?: string
    content: string
}

When targetPath is supplied, the plugin performs exact-file validation after the user picks a file. If the selected file does not match the requested target, the command rejects instead of creating a bookmark for the wrong file.

readByBookmark() returns:

type ReadResult = {
    fileName: string
    content: string
}

Permissions

The default permission set enables all plugin commands.

Available permissions are documented in permissions/autogenerated/reference.md and include:

  • ios-bookmark:allow-pick-and-bookmark
  • ios-bookmark:allow-read-by-bookmark
  • ios-bookmark:allow-forget-bookmark

Platform Notes

  • This plugin is iOS-only.
  • The file picker is backed by UIDocumentPickerViewController.
  • If targetPath is provided, the plugin uses it as best-effort picker context and enforces exact-file validation after selection.
  • Bookmarks are intended for persistent access to user-selected files.
  • On unsupported platforms, initialization returns an unsupported error path.