#+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. 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" scheme runs 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 are in Settings ▸ About orgstar ▸ Support Development, for everyone, and unlock nothing. The Mac app has no tips: it is sold outside the App Store and has no StoreKit. 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 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 #+BEGIN_SRC sh swift test # all tests ORGSTAR_GATES=1 swift test -c release --filter GateTests # performance gates #+END_SRC * 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. =scripts/release-ios.sh= then 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=. * 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.