Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
iOS host: typecheck against the real SDK, wire the seed shell
nyblnet226205d67a91
diff --git a/ios/BentoHost/DocumentBrowserViewController.swift b/ios/BentoHost/DocumentBrowserViewController.swiftindex 70045268..78e04a08 100644--- a/ios/BentoHost/DocumentBrowserViewController.swift+++ b/ios/BentoHost/DocumentBrowserViewController.swift@@ -33,15 +33,15 @@ final class DocumentBrowserViewController: UIDocumentBrowserViewController,func documentBrowser(_ c: UIDocumentBrowserViewController, didPickDocumentsAt urls: [URL]) {guard let url = urls.first else { return }- present(url)+ openEditor(url)}func documentBrowser(_ c: UIDocumentBrowserViewController, didImportDocumentAt sourceURL: URL,toDestinationURL destinationURL: URL) {- present(destinationURL)+ openEditor(destinationURL)}- private func present(_ url: URL) {+ private func openEditor(_ url: URL) {// Security-scoped access: a document opened in place lives outside the// app container, so the URL must be scoped for the whole editing// session and released when the editor closes.diff --git a/ios/README.md b/ios/README.mdindex 5bba12ef..e8ac0efd 100644--- a/ios/README.md+++ b/ios/README.md@@ -94,14 +94,18 @@ browser with the native side emulated (`begin`/`write` over the same protocol):- "Save a copy…" prompts for a destination and leaves the open documentuntouched-Not verified — **none of the Swift has been compiled or run.** It was written on-a machine without Xcode; `swiftc -parse` checks syntax only and cannot resolve-UIKit or WebKit. Treat every Swift file as unreviewed until it builds.+Also verified — the Swift **typechecks against the real iOS 26.5 simulator SDK**+(`swiftc -typecheck -sdk $(xcrun --sdk iphonesimulator --show-sdk-path)`), so+UIKit, WebKit, `UIDocument`, `WKURLSchemeHandler` and every protocol conformance+resolve. That is full semantic analysis, not a syntax pass.++Not verified — **the app has never been linked, launched or run.** Typechecking+stops before codegen and linking, and nothing has exercised the bridge on an+actual device or simulator. Runtime behaviour — the scheme handler serving+bytes, security-scoped access, the save round trip reaching disk — is still+unproven.Still to do:-- `Resources/starter.bento.html` — the seed for new documents. Not committed;- wire a build step that copies `slides/dist-single/Bento_Slides.bento.html`.- Until then, document creation fails.- App icon, launch screen, signing, an Apple Developer account ($99/yr).- Decide whether a `.bento.html` UTI is worth declaring over plain `public.html`.diff --git a/ios/project.yml b/ios/project.ymlindex f5bcd2a0..f46dd59b 100644--- a/ios/project.yml+++ b/ios/project.yml@@ -12,6 +12,20 @@ targets:platform: iOSsources:- path: BentoHost+ preBuildScripts:+ # The seed shell for "new document". Copied from the current build rather+ # than committed: a 587KB binary in git would churn on every release, and+ # the seed ages harmlessly anyway — a new deck self-updates through the+ # normal signed channel the first time it checks.+ - name: Stage starter shell+ script: |+ SRC="$SRCROOT/../slides/dist-single/Bento_Slides.bento.html"+ DST="$SRCROOT/BentoHost/Resources/starter.bento.html"+ if [ -f "$SRC" ]; then+ mkdir -p "$(dirname "$DST")" && cp "$SRC" "$DST"+ elif [ ! -f "$DST" ]; then+ echo "warning: no starter shell — run 'npm run build:single' in slides/; new-document creation will fail"+ fisettings:base:INFOPLIST_FILE: BentoHost/Info.plist