From a4da89202c6c724f47ac7f4b94f5b06906cba9a8 Mon Sep 17 00:00:00 2001 From: NiallJoeMaher Date: Mon, 23 Nov 2026 10:40:59 +0000 Subject: [PATCH] iPhone: the photo library's purpose text, which App Store Connect refused 1.7.0 (15) for lacking The photo picker asks nothing, so its words were left out. Apple checks the binary, not the behaviour: the picker's library can reach the photo library, and a build with no NSPhotoLibraryUsageDescription fails processing (ITMS-90683). The words are in, in ten languages. The next build number now counts uploads Apple refused, whose numbers are spent. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01Chg7BD2Sf1yNRFCX24or7B Signed-off-by: NiallJoeMaher --- apps/ios/app.config.ts | 24 ++++++++++++++++++++---- apps/ios/scripts/asc.mjs | 7 +++++-- docs/ios.md | 2 +- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/apps/ios/app.config.ts b/apps/ios/app.config.ts index 9e19d609..2d98d4a6 100644 --- a/apps/ios/app.config.ts +++ b/apps/ios/app.config.ts @@ -45,6 +45,21 @@ const CAMERA = { ko: "담을 사진을 찍을 때 Pluck이 카메라를 엽니다.", "zh-Hans": "拍照摘下时,Pluck 会打开相机。", }; +// Why Pluck reads photos. iOS never asks this: Add uses iOS's own picker, which hands over only what is picked. But +// the picker's library can reach the whole photo library, and App Store Connect refuses a build that has such code +// and no words for it (ITMS-90683, which failed 1.7.0's first upload), so the words are here, and true. +const PHOTOS: Record = { + en: "Pluck plucks the photos you choose. It sees only the ones you pick.", + es: "Pluck recoge las fotos que eliges. Solo ve las que tú eliges.", + "pt-BR": "O Pluck colhe as fotos que você escolhe. Ele vê só as que você escolhe.", + fr: "Pluck cueille les photos que vous choisissez. Il ne voit que celles-là.", + de: "Pluck pflückt die Fotos, die du auswählst. Es sieht nur diese.", + ja: "選んだ写真をPluckします。選んだ写真以外は見えません。", + it: "Pluck prende le foto che scegli. Vede solo quelle.", + nl: "Pluck plukt de foto's die je kiest. Het ziet alleen die.", + ko: "고른 사진을 Pluck에 담습니다. 고른 사진만 볼 수 있어요.", + "zh-Hans": "Pluck 会摘下你选的照片,只能看到你选的那些。", +}; // What iOS shows the first time the microphone is tapped (components/Speak.tsx): two questions, one for the // microphone and one for turning speech into text. const MIC: Record = { @@ -147,16 +162,17 @@ const config: ExpoConfig = { "expo-splash-screen", { image: "./assets/splash.png", imageWidth: 123, backgroundColor: "#F6F8F4", dark: { image: "./assets/splash-dark.png", backgroundColor: "#10130F" } }, ], - // Add, Photo and Camera (app/add.tsx). The photo library needs no permission: iOS's own picker hands over only - // what the person picks. The camera asks, in the words below; nothing records sound. + // Add, Photo and Camera (app/add.tsx). The photo library asks nothing: iOS's own picker hands over only what the + // person picks. Its words are given all the same (see PHOTOS): `false` takes them out, and Apple refuses the build. + // The camera asks, in the words below; nothing records sound. // The microphone text is given here too: `false` would take the question's words out again, after the speech // plugin had put them in, and iOS closes an app that asks for the microphone without them. - ["expo-image-picker", { cameraPermission: CAMERA.en, photosPermission: false, microphonePermission: MIC.en }], + ["expo-image-picker", { cameraPermission: CAMERA.en, photosPermission: PHOTOS.en, microphonePermission: MIC.en }], ["expo-speech-recognition", { microphonePermission: MIC.en, speechRecognitionPermission: SPEECH.en }], "@bacons/apple-targets", ], // The camera and microphone questions in the other nine languages (iOS reads them from each InfoPlist.strings). - locales: Object.fromEntries(Object.entries(CAMERA).filter(([l]) => l !== "en").map(([l, text]) => [l, { NSCameraUsageDescription: text, NSMicrophoneUsageDescription: MIC[l], NSSpeechRecognitionUsageDescription: SPEECH[l] }])), + locales: Object.fromEntries(Object.entries(CAMERA).filter(([l]) => l !== "en").map(([l, text]) => [l, { NSCameraUsageDescription: text, NSPhotoLibraryUsageDescription: PHOTOS[l], NSMicrophoneUsageDescription: MIC[l], NSSpeechRecognitionUsageDescription: SPEECH[l] }])), // showServer: "Use your own server" on the sign-in screen. Off in store builds (it distracts everyone who is not // self-hosting); on for PLUCK_SHOW_SERVER=1 or a build pointed at another server. A server's own pluck://signin?server= // link opens it in any build. diff --git a/apps/ios/scripts/asc.mjs b/apps/ios/scripts/asc.mjs index bf05a433..1c437ed0 100644 --- a/apps/ios/scripts/asc.mjs +++ b/apps/ios/scripts/asc.mjs @@ -27,10 +27,13 @@ async function all(path) { return rows; } -// One more than the highest build number uploaded, for any version. +// One more than the highest build number uploaded, for any version. An upload Apple refused while processing never +// becomes a build, but its number is spent all the same, so those are counted too. export async function nextBuild() { const builds = await all(`/v1/builds?filter[app]=${ASC_APP_ID}&fields[builds]=version&limit=200`); - return Math.max(0, ...builds.map((b) => Number.parseInt(b.attributes.version, 10) || 0)) + 1; + const refused = await all(`/v1/apps/${ASC_APP_ID}/buildUploads?limit=200`).catch(() => []); + const numbers = [...builds.map((b) => b.attributes.version), ...refused.map((u) => u.attributes.cfBundleVersion)]; + return Math.max(0, ...numbers.map((n) => Number.parseInt(n, 10) || 0)) + 1; } // Every version uploaded, to TestFlight or the App Store. diff --git a/docs/ios.md b/docs/ios.md index c65a87b1..8db0da9c 100644 --- a/docs/ios.md +++ b/docs/ios.md @@ -72,7 +72,7 @@ It first asks which version this is (`scripts/release.mjs`): it shows the last v - **App Group** `group.io.getpluck.app`: the app writes the Lists (last added to first) and the tags the share sheet shows; the share extension writes what it could not send (`pending/*.json` and copied files) and the app sends them when it next comes to the foreground. - **Offline:** the TanStack Query cache is persisted (SQLite key-value), so the app opens on what it last saw; plucks made with no connection queue on the phone. `expo-network` tells TanStack Query when the connection goes, so queries wait instead of failing and pick up when it is back (plucks go up then too). With no connection the tab bar shows a clay "Offline" pill, which takes the waiting count when there is one ("Offline · 2 waiting"). An Item whose text is not on the phone opens to "Not on this iPhone yet.", not an error. - **Kept on this iPhone** (Settings, Library; on by default): on Wi-Fi only, when the app opens or comes back, at most every 15 minutes, the app keeps the newest 300 Items across Inbox, Later and Lists, and every Item kept by hand (the download mark in the reader; it stays until let go, wherever the Item is now, and a small mark shows on its row). `lib/keep.ts` picks them: images, pages still being plucked and pages that could not be read are left out unless kept by hand. Each keeps its text and highlights as one key in SQLite (`kept:`), beside the query cache rather than in it, and its cover on disk (`Documents/kept/.img`); a PDF kept by hand keeps its file too. Pictures and files stop at 500 MB, and over it the oldest automatic copies lose their pictures first, never one kept by hand. Covers and files come from short-lived bucket addresses the API hands over as JSON (`/cover?as=json`, `/file`), so the download carries no Authorization header. A PDF opens on its file in the reader (a WebView of the phone's copy, else the one fetched for now); offline it needs the download mark. Share on a PDF or an Image hands over the file itself, so Save to Files saves it: the phone's copy first, then the original URL, then ours. Only new or changed Items are fetched, one at a time with a pause, well under the API's read limit. Turning it off, "Clear the offline copy" and signing out delete everything kept, by hand too. Languages need nothing: every catalog is bundled into the app. -- **Files** (images, PDFs) from the share sheet: `POST /api/v1/items/files` makes the item and returns a signed upload URL; a background `URLSession` uploads the bytes after the sheet closes, and the worker reads them once they arrive. The share sheet sends a HEIC photo as a JPEG, at most 3000 pixels on its long side, so the web and an AI tool can show it. Add has Photo (iOS's own picker, which needs no permission and hands over only what is picked) and Camera (asks for the camera once, in the words in `app.config.ts`, in every language); what is picked shows in the Add box first, where it can be taken out again and a note written or spoken under it. Pluck it then sends each photo up as a JPEG the same way, `POST /api/v1/items//file` says it is in, so the picture is read at once, and the note goes on each Image. A photo needs a connection: it is not queued. The iPhone's Add has no Cancel: it is pulled down by its grabber, or put away by a tap outside it. +- **Files** (images, PDFs) from the share sheet: `POST /api/v1/items/files` makes the item and returns a signed upload URL; a background `URLSession` uploads the bytes after the sheet closes, and the worker reads them once they arrive. The share sheet sends a HEIC photo as a JPEG, at most 3000 pixels on its long side, so the web and an AI tool can show it. Add has Photo (iOS's own picker, which asks nothing and hands over only what is picked; `app.config.ts` still carries the photo library's words, because App Store Connect refuses a build without them, ITMS-90683) and Camera (asks for the camera once, in the words in `app.config.ts`, in every language); what is picked shows in the Add box first, where it can be taken out again and a note written or spoken under it. Pluck it then sends each photo up as a JPEG the same way, `POST /api/v1/items//file` says it is in, so the picture is read at once, and the note goes on each Image. A photo needs a connection: it is not queued. The iPhone's Add has no Cancel: it is pulled down by its grabber, or put away by a tap outside it. - **Rich Notes:** the words of a Note, Todo or Thing are written in `components/RichText.tsx`, a native editor (`react-native-enriched-markdown`) with a bar over the keyboard: Bold, Italic, Heading (one tap a heading, a second a smaller one, a third plain text), Bullets, Numbers and Done. Typing `- ` or `# ` at the start of a line does the same. What is kept is Markdown, one line one block, exactly as a plain Note always was (docs/adr/0002). The editor opens a Note only when it reads the text back the same (`sameNote` in shared-schemas); one it would change (a table or a quote an AI tool wrote) opens in the plain editor, so nothing is rewritten. The screen follows the caret, so the line being typed stays over the bar and the keyboard. Two things in the library are worked round: its caret event never fires on iOS (the caret is asked for on each move), and its headings ignore the weight of a bundled font (`patches/react-native-enriched-markdown@1.2.0.patch`). `-demoWrite 1` opens a Note with the keyboard up, for screenshots. - **A new Note:** Add's Note button leaves the sheet for `items/new`, the Note editor with no Item yet, keyboard up. The Note is plucked with its first words and edited from then on, so an empty one never reaches the Inbox; leaving before the pause is over keeps what was typed. - **Tags:** an Item's tags show wherever the Item does, drawn by one component (`components/Tags.tsx`): on its row on iPhone (one line) and iPad, and under the title in the reader and in a Note, where a tap opens the tag picker. A Note with none shows a quiet Tags chip, because the toolbar's Tags is under the keyboard while it is written. Typing `#word` in a Note, or in the note on a link, tags the Item too: the server reads it (`apps/web/lib/library/hashtags.ts`), and the app reads the tags again so the chip has its name.