#+TITLE: Contributing * Status Design phases 1–7 are built. The Mac app is released as a notarized DMG and a Homebrew cask, with Sparkle updates; a second, sandboxed build is on the Mac App Store (see /Mac App Store build/). The iOS and watchOS apps build from the Xcode project for the Simulator and for a device signed with your own team, and go to TestFlight and the [[https://apps.apple.com/us/app/orgstar-org-mode-agenda/id6821552018][App Store]] with =scripts/release-ios.sh=. Owed: the M1 Air gate run (issue 2) and the VoiceOver passes on the Mac and iOS (issues 3 and 4). =docs/design.md= is the design; =docs/plans/= has one plan per piece of work. * Build and run Requires macOS 26 and Xcode 27 (Swift 6.2 tools). #+BEGIN_SRC sh scripts/build-app.sh # builds .build/app/orgstar.app, signed ad hoc open .build/app/orgstar.app #+END_SRC Add a folder with File > Add Folder… (⇧⌘O). ⌘P opens a file by name, ⇧⌘F searches, ⇧⌘A shows the agenda. In the editor, TAB on a heading cycles its folding and Shift-TAB cycles the whole file. orgstar opens =.org= files from Finder once the app has been launched. C-c C-v t tangles the file's source blocks into the files their =:tangle= header names, as =org-babel-tangle= does. =org-protocol://capture?template=…&url=…&title=…&body=…= and =org-protocol://store-link?url=…&title=…= links work as in Emacs, so browser bookmarklets written for org-protocol work unchanged. Shortcuts has a "Capture to orgstar" action that files text with a capture template. Settings live in =~/.config/orgstar/config.toml= (orgstar ▸ Edit Config File), with keys in =keymap.toml= and capture templates in =capture.toml= beside it. Settings ▸ General ▸ Import from Emacs reads an existing Emacs or Doom configuration. * iOS The iOS app (iOS 26) is the "Orgstar iOS" scheme in =ios/Orgstar.xcodeproj=, with the share and Quick Look extensions. It builds from the package's sources and signs automatically with the team set in the project; choose a device or Simulator and Run. For the Simulator without Xcode: #+BEGIN_SRC sh scripts/build-ios-app.sh # builds .build/ios-app/orgstar.app xcrun simctl install booted .build/ios-app/orgstar.app #+END_SRC On iOS, orgstar in the share sheet takes a page or text with a template; the app opens its capture sheet with it when it's next active. Shortcuts has the same "Capture to orgstar" action as on the Mac. ** In-app purchases =ios/Orgstar.storekit= is the StoreKit configuration the "Orgstar iOS" and "Orgstar macOS" schemes run with, so purchases work in Xcode without App Store Connect. It holds orgstar+ (=sh.krz.orgstar.pro.monthly=, =.yearly=, =.lifetime=) and the consumable tips (=sh.krz.orgstar.tip.small=, =.medium=, =.large=, at 0.99, 2.99 and 4.99). Tips unlock nothing. On iOS they are in Settings ▸ About orgstar ▸ Support Development, and in the Mac App Store build in Settings ▸ orgstar+, below the plans. The Developer ID Mac app has no StoreKit and no tips; orgstar+ there comes with a license key (see /Mac licenses/). The Mac App Store build has the iOS app's bundle ID, =sh.krz.orgstar=, as a Universal Purchase, so it sells the same products at the same prices and a purchase on one platform unlocks the other. Nobody is grandfathered in the Mac App Store build: =ProStore.grandfathers= is true only on iOS. In App Store Connect, create each tip as a Consumable with the exact product ID, a display name and description in every localization the app has (de, fr, ja, es-ES, pt-BR), a price and availability, and a review screenshot of the About screen's Support Development section. Submit new in-app purchases with an app version. Changes take up to an hour to reach the sandbox; test there with a Sandbox Apple Account (Settings ▸ Developer on the device). * Mac App Store build The "Orgstar macOS" scheme in =ios/Orgstar.xcodeproj= builds the Mac app for the Mac App Store: the same =Sources/Orgstar= with the =APPSTORE= compilation condition, sandboxed, with the widgets, Quick Look and Spotlight extensions, and without Sparkle or the =OrgPrograms= target. =ios/OrgstarMac= has its =Info.plist=, entitlements and privacy manifest. Choose My Mac and Run; it signs with the team set in the project. =APPSTORE= is set only by the Xcode targets, so =swift build= and =scripts/build-app.sh= build the Developer ID app exactly as before. Within the shared packages, the sandbox is detected at run time (=Sandbox.isActive=). The manual's Install page lists what the App Store build does differently. The sandboxed app keeps its data in =~/Library/Containers/sh.krz.orgstar/=, and the widgets' data in =~/Library/Group Containers/group.sh.krz.orgstar/=. A development build and a Mac App Store install share them, as they share the bundle ID. Keep the Developer ID app out of the way while testing, since Finder, Quick Look, Spotlight and URL handlers bind to one copy. ** Mac screenshots App Store Connect takes Mac screenshots at 1280x800, 1440x900, 2560x1600 or 2880x1800 pixels. The set lives in =ios/AppStore/screenshots/mac/=, at 2880x1800: window captures centred on a radial gradient. To take one on a Retina display: 1. Run the "Orgstar macOS" scheme. Remove other folders from its sidebar and add =ios/AppStore/demo= with File ▸ Add Folder…. 2. Set up each shot, then run =screencapture -o -w raw.png= and click the window. 3. Put it on the background, scaled to fit 2640x1640, with no alpha channel: #+BEGIN_SRC sh magick -size 2880x1800 radial-gradient:'#56722c-#182109' bg.png magick raw.png -resize '2640x1640>' win.png magick bg.png win.png -gravity center -composite -background '#182109' -alpha remove -alpha off \ ios/AppStore/screenshots/mac/NN-name.png #+END_SRC The demo's dates are around Friday 16 October 2026; in the agenda, Go to Date shows that week. The set has four shots: =01-editor= (=work.org=, with the sidebar showing), =02-agenda= (the week), =03-table= (=home.org= and its table) and =04-capture= (the capture window with a template). Show nothing the App Store build leaves out: no code block results from languages other than Emacs Lisp, no Emacs exports, no license key form and no update settings. * Mac licenses orgstar+ for Mac comes with GitHub Sponsors: $60 once for a key that doesn't expire, or $5 a month for a key that expires after 40 days and that the app renews daily from 30 days before. =packaging/license-issuer= is the Cloudflare Worker that serves =krz.sh/apps/orgstar/buy=, =/license= (Sign in with GitHub, then the key) and =/renew=; its header describes the key format. Setup, once: - In GitHub Sponsors, publish a $60 one-time tier and a $5 monthly tier. - Create a GitHub OAuth app with the callback URL =https://krz.sh/apps/orgstar/license= and put its client ID in =GITHUB_CLIENT_ID= in =wrangler.toml=. - =npx wrangler secret put GITHUB_CLIENT_SECRET= with the OAuth app's secret, and =GITHUB_TOKEN= with a classic token of an owner of the krz-labs organization (=read:org=, =read:user=), which renewals use to list its sponsors. - =packaging/license-issuer/keygen.sh= set =LICENSE_PRIVATE_KEY= and the app's public key. Running it again invalidates every key issued so far. =node --test packaging/license-issuer= runs the Worker's tests; =npx wrangler deploy= from that folder publishes it. * Tests #+BEGIN_SRC sh swift test # all tests ORGSTAR_GATES=1 swift test -c release --filter GateTests # performance gates #+END_SRC =swift test= covers the Developer ID build. =APPSTORE= is set only in the Xcode targets, so also check that the App Store build and the iOS app compile: #+BEGIN_SRC sh xcodebuild -project ios/Orgstar.xcodeproj -scheme 'Orgstar macOS' -destination 'generic/platform=macOS' \ -derivedDataPath .build/xcode CODE_SIGNING_ALLOWED=NO build xcodebuild -project ios/Orgstar.xcodeproj -scheme 'Orgstar iOS' -destination 'generic/platform=iOS Simulator' \ -derivedDataPath .build/xcode build #+END_SRC There is no CI; run these before committing. * Release =scripts/release-mac.sh = builds a universal app, signs it with the keychain's Developer ID, notarizes a DMG, tags =v=, uploads the DMG to the gitbay release and updates the cask in krz/homebrew-tap. Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay release. Without them both get the one-line platform note. Each release goes out on three channels, in this order, from the same commit: 1. =scripts/release-mac.sh =, the Developer ID app. 2. =scripts/release-ios.sh=, the iOS app. 3. =scripts/release-macos.sh=, the Mac App Store app. The App Store builds take their version from =MARKETING_VERSION= in =ios/Orgstar.xcodeproj=, which every target shares and appstore-kit requires to be the same across them. Set it to == before the release. =scripts/release-ios.sh= archives the =Orgstar iOS= scheme, with its extensions and the watch app, and uploads it to App Store Connect for TestFlight. It signs automatically with the team's distribution certificate through the Apple ID signed in to Xcode (Xcode ▸ Settings ▸ Accounts), so it needs no key of its own. The version is the project's =MARKETING_VERSION=; the build number is the commit count, as the Mac's is, so each upload needs a new commit. =ORGSTAR_PUBLISH=0= archives and exports the =.ipa= to =.build/ios-release= without uploading. The script sources =release-ios.sh= from appstore-kit, checked out beside this repository or at =$APPSTORE_KIT=. =scripts/release-macos.sh= does the same for the =Orgstar macOS= scheme, with appstore-kit's =platform=macos=, and uploads a =.pkg=. Before archiving it checks that the scheme has =APPSTORE= and the bundle ID =sh.krz.orgstar= and that no entitlements file has a temporary exception. Before exporting it checks the archive: no Sparkle, no =SU*= keys in =Info.plist=, no =NSTask= or =posix_spawn= in any executable, and no temporary-exception entitlements. It doesn't check provisioning profiles: the archive is signed for development, which gives extensions without capabilities none, and the export signs every bundle again. =ORGSTAR_PUBLISH=0= exports the =.pkg= to =.build/macos-release= without uploading. The macOS listing, review notes and TestFlight information are in =ios/AppStore/metadata.md=. * App Store header =ios/AppStore/header.conf= sets the product page header's background and screenshots; appstore-kit's =render-header.sh ios/AppStore= renders it.