CONTRIBUTING.org
120 lines · 5950 bytes
1#+TITLE: Contributing
2
3* Status
4
5Design phases 1–7 are built. The Mac app is released as a notarized DMG and a Homebrew
6cask, with Sparkle updates. The iOS and watchOS apps build from the Xcode project for the
7Simulator and for a device signed with your own team, and go to TestFlight and the
8[[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
9passes on the Mac and iOS (issues 3 and 4).
10
11=docs/design.md= is the design; =docs/plans/= has one plan per piece of work.
12
13* Build and run
14
15Requires macOS 26 and Xcode 27 (Swift 6.2 tools).
16
17#+BEGIN_SRC sh
18scripts/build-app.sh # builds .build/app/orgstar.app, signed ad hoc
19open .build/app/orgstar.app
20#+END_SRC
21
22Add a folder with File > Add Folder… (⇧⌘O). ⌘P opens a file by name, ⇧⌘F searches,
23⇧⌘A shows the agenda. In the editor, TAB on a heading cycles its folding and Shift-TAB
24cycles the whole file. orgstar opens =.org= files from Finder once the app has been
25launched.
26
27C-c C-v t tangles the file's source blocks into the files their =:tangle= header
28names, as =org-babel-tangle= does.
29
30=org-protocol://capture?template=…&url=…&title=…&body=…= and
31=org-protocol://store-link?url=…&title=…= links work as in Emacs, so browser
32bookmarklets written for org-protocol work unchanged. Shortcuts has a "Capture to
33orgstar" action that files text with a capture template.
34
35Settings live in =~/.config/orgstar/config.toml= (orgstar ▸ Edit Config File), with
36keys in =keymap.toml= and capture templates in =capture.toml= beside it. Settings ▸
37General ▸ Import from Emacs reads an existing Emacs or Doom configuration.
38
39* iOS
40
41The iOS app (iOS 26) is the "Orgstar iOS" scheme in =ios/Orgstar.xcodeproj=, with the
42share and Quick Look extensions. It builds from the package's sources and signs
43automatically with the team set in the project; choose a device or Simulator and Run.
44For the Simulator without Xcode:
45
46#+BEGIN_SRC sh
47scripts/build-ios-app.sh # builds .build/ios-app/orgstar.app
48xcrun simctl install booted .build/ios-app/orgstar.app
49#+END_SRC
50
51On iOS, orgstar in the share sheet takes a page or text with a template; the app opens
52its capture sheet with it when it's next active. Shortcuts has the same "Capture to
53orgstar" action as on the Mac.
54
55** In-app purchases
56
57=ios/Orgstar.storekit= is the StoreKit configuration the "Orgstar iOS" scheme runs with, so
58purchases work in Xcode without App Store Connect. It holds orgstar+
59(=sh.krz.orgstar.pro.monthly=, =.yearly=, =.lifetime=) and the consumable tips
60(=sh.krz.orgstar.tip.small=, =.medium=, =.large=, at 0.99, 2.99 and 4.99). Tips are in
61Settings ▸ About orgstar ▸ Support Development, for everyone, and unlock nothing. The Mac app
62has no tips: it is sold outside the App Store and has no StoreKit.
63
64In App Store Connect, create each tip as a Consumable with the exact product ID, a display
65name and description in every localization the app has (de, fr, ja, es-ES, pt-BR), a price
66and availability, and a review screenshot of the About screen's Support Development section.
67Submit new in-app purchases with an app version. Changes take up to an hour to reach the
68sandbox; test there with a Sandbox Apple Account (Settings ▸ Developer on the device).
69
70* Mac licenses
71
72orgstar+ for Mac comes with GitHub Sponsors: $60 once for a key that doesn't expire, or $5 a
73month for a key that expires after 40 days and that the app renews daily from 30 days before.
74=packaging/license-issuer= is the Cloudflare Worker that serves =krz.sh/apps/orgstar/buy=,
75=/license= (Sign in with GitHub, then the key) and =/renew=; its header describes the key
76format.
77
78Setup, once:
79- In GitHub Sponsors, publish a $60 one-time tier and a $5 monthly tier.
80- Create a GitHub OAuth app with the callback URL =https://krz.sh/apps/orgstar/license= and
81 put its client ID in =GITHUB_CLIENT_ID= in =wrangler.toml=.
82- =npx wrangler secret put GITHUB_CLIENT_SECRET= with the OAuth app's secret, and
83 =GITHUB_TOKEN= with a classic token of an owner of the krazywarez organization (=read:org=,
84 =read:user=), which renewals use to list its sponsors.
85- =packaging/license-issuer/keygen.sh= set =LICENSE_PRIVATE_KEY= and the app's public key.
86 Running it again invalidates every key issued so far.
87
88=node --test packaging/license-issuer= runs the Worker's tests; =npx wrangler deploy= from
89that folder publishes it.
90
91* Tests
92
93#+BEGIN_SRC sh
94swift test # all tests
95ORGSTAR_GATES=1 swift test -c release --filter GateTests # performance gates
96#+END_SRC
97
98* Release
99
100=scripts/release-mac.sh <version>= builds a universal app, signs it with the
101keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the
102gitbay release and updates the cask in krz/homebrew-tap.
103
104Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's
105update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay
106release. Without them both get the one-line platform note.
107
108=scripts/release-ios.sh= then archives the =Orgstar iOS= scheme, with its extensions and the
109watch app, and uploads it to App Store Connect for TestFlight. It signs automatically with the
110team's distribution certificate through the Apple ID signed in to Xcode (Xcode ▸ Settings ▸
111Accounts), so it needs no key of its own. The version is the project's =MARKETING_VERSION=;
112the build number is the commit count, as the Mac's is, so each upload needs a new commit.
113=ORGSTAR_PUBLISH=0= archives and exports the =.ipa= to =.build/ios-release= without uploading.
114The script sources =release-ios.sh= from appstore-kit, checked out beside this repository or
115at =$APPSTORE_KIT=.
116
117* App Store header
118
119=ios/AppStore/header.conf= sets the product page header's background and screenshots;
120appstore-kit's =render-header.sh ios/AppStore= renders it.