Skip to content

PureNotes for tablets: read and edit Apple Notes straight from iCloud - #2

Open
Theralley wants to merge 33 commits into
Lrdsnow:mainfrom
Theralley:main
Open

Theralley wants to merge 33 commits into
Lrdsnow:mainfrom
Theralley:main

Conversation

@Theralley

Copy link
Copy Markdown

Hi! This adds a second app next to the original one, in its own folder tablet/. Nothing in the existing Skip app is changed; the root README gets a short section pointing to it.

What it is
A Kotlin/Compose Android app that signs in to iCloud on the device (Apple's own sign-in page in a WebView) and reads and edits Apple Notes directly. No Mac, no backup, no file permissions.

What it does

  • Checklists you can tick, typing, Enter, new items; it saves itself.
  • Headings, bulleted/dashed/numbered lists, indents and quotes (Aa menu).
  • Bold, italic, underline, strikethrough and links on selected or typed text.
  • Shows tables, photos, scans (all pages) and drawings; tags; search; split view; dark mode; offline copy.

Keeping notes intact
Notes are CRDT documents. The edit engine (NoteDoc.kt) is a port of a tested reference implementation, and the unit tests replay 278 recorded edits and require the same bytes back. Every save reads the note first and sends nothing if it changed elsewhere. Tested against real notes, with the Mac receiving every change without duplicates.

Limits
Locked notes stay closed; notes with attachments are read-only; voice recordings show by name only; no "new note" yet.

Building
.github/workflows/tablet.yml runs the unit tests and builds the APK on pushes touching tablet/. It signs with a fixed debug key from the secret DEBUG_KEYSTORE_B64; without that secret the step needs adjusting (or the key line removed).

Happy to change the layout, naming or anything else if you'd prefer it another way.

Kotlin and Compose. The person signs in on www.icloud.com inside a WebView,
and the app reads the Notes CloudKit database from within that page, so
no Mac, iPhone backup or file copy is needed. Notes are cached in app
storage for offline reading. Built on GitHub Actions.
Following Apple's Human Interface Guidelines: inset grouped
lists on the grouped background, large title, capsule search field, a Notes
gold accent that meets 4.5:1 in light and dark, two-pane split view from
700 dp so portrait iPad-size tablets get it, pull to refresh, a more menu
instead of text buttons, a confirmed sign-out, and a count in the bottom
bar. Text styles follow the iPadOS Dynamic Type sizes.
Read the paragraph style runs of a note (kind, indent, checklist done flag)
and draw checklists with round checkboxes, bulleted, dashed and numbered
lists, headings and monospaced lines. Display only: ticking is not written
back yet.
NoteDoc is a line-for-line Kotlin port of ICLOUD-SDK's notes_doc.py (the
CRDT edit Notes merges), checked byte for byte against vectors the Python
code made. A save reads the note fresh, refuses if it changed elsewhere,
and sends one records/modify with the change tag, under this app's own
writer id. Notes with formatting the SDK does not write stay read-only.
… drawings, sound

Character formatting (bold, italic, underline, strikethrough), clickable
links, headings, bulleted, dashed and numbered lists with indents, block
quotes and monospaced lines. Attachments are read from their own iCloud
records and kept on the tablet: tables from their CRDT document, pictures
and drawings as images, scanned documents rendered page by page from their
PDF, recordings playable, hashtags inline.
…ting

The edit engine writes the kinds of line Notes has (headings, subheadings,
monospaced, bulleted, dashed and numbered lists), list levels and block
quotes, and keeps each kept character's format (bold, italic, underline,
strikethrough, links, fonts), alignment and list numbers. On notes the SDK
writes, the bytes are still the SDK's. The editor draws the lines as Notes
does and gets an Aa menu to change a line's kind and level.
…ist number restamp, first line kept as it is, no shared checklist ids, last empty line shown, taps forgotten after use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant