CONTRIBUTING.org

v1.1.1
orgstar/CONTRIBUTING.org rendered · source · history · blame · raw

212 lines · 11496 bytes

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 for the Mac App Store is not yet released (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 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).

scripts/build-app.sh          # builds .build/app/orgstar.app, signed ad hoc
open .build/app/orgstar.app

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:

scripts/build-ios-app.sh      # builds .build/ios-app/orgstar.app
xcrun simctl install booted .build/ios-app/orgstar.app

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.

Not yet done before the first submission:

  • A smoke test of a signed, sandboxed build: Grant Access… for includes, setup files, tangle and export targets, images, capture, archive and dailies outside the folders (including a picked folder that doesn't contain the one asked for); Can't Open and regranting a folder; files opened from Finder coming back after a relaunch and after a force quit; the configuration folder after a relaunch; :shebang tangling setting the mode; Save Elsewhere… for exports; the Import from Emacs pickers; the welcome sheet's iCloud Drive folder.
  • The Mac screenshots (below).
  • The TestFlight group for the Mac app, in App Store Connect.
  • Installing each Mac version over the other, with the results in the manual's Install page.

Mac screenshots

App Store Connect takes Mac screenshots at 1280x800, 1440x900, 2560x1600 or 2880x1800 pixels. The set lives in ios/AppStore/screenshots/mac/; the 01-editor.png there now is 2560x1720 and is not accepted, so replace it. To take a 2880x1800 set 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. Size the main window to 1440 by 900 points (Terminal needs Accessibility access in System Settings ▸ Privacy & Security):

    osascript -e 'tell application "System Events" to tell process "orgstar" to set size of front window to {1440, 900}'
  3. Set up each shot, then run screencapture -i -w -o ios/AppStore/screenshots/mac/NN-name.png and click the window. -o leaves out the shadow.
  4. Check the size with sips -g pixelWidth -g pixelHeight ios/AppStore/screenshots/mac/*.png.

The demo's dates are around Friday 16 October 2026; in the agenda, Go to Date shows that week. Take five shots: 01-editor (work.org, with the sidebar showing), 02-agenda (the week), 03-board (the agenda's board as kanban columns), 04-tables (home.org and its table) and 05-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 krazywarez 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

swift test                                                 # all tests
ORGSTAR_GATES=1 swift test -c release --filter GateTests   # performance gates

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:

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

There is no CI; run these before committing.

Release

scripts/release-mac.sh <version> builds a universal app, signs it with the keychain's Developer ID, notarizes a DMG, tags v<version>, 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 <version>, 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 <version> 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, no temporary-exception entitlements, and an embedded.provisionprofile in the app and each extension. 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.