CONTRIBUTING.org
99 lines · 4818 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* Tests
71
72#+BEGIN_SRC sh
73swift test # all tests
74ORGSTAR_GATES=1 swift test -c release --filter GateTests # performance gates
75#+END_SRC
76
77* Release
78
79=scripts/release-mac.sh <version>= builds a universal app, signs it with the
80keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the
81gitbay release and updates the cask in krz/homebrew-tap.
82
83Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's
84update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay
85release. Without them both get the one-line platform note.
86
87=scripts/release-ios.sh= then archives the =Orgstar iOS= scheme, with its extensions and the
88watch app, and uploads it to App Store Connect for TestFlight. It signs automatically with the
89team's distribution certificate through the Apple ID signed in to Xcode (Xcode ▸ Settings ▸
90Accounts), so it needs no key of its own. The version is the project's =MARKETING_VERSION=;
91the build number is the commit count, as the Mac's is, so each upload needs a new commit.
92=ORGSTAR_PUBLISH=0= archives and exports the =.ipa= to =.build/ios-release= without uploading.
93The script sources =release-ios.sh= from appstore-kit, checked out beside this repository or
94at =$APPSTORE_KIT=.
95
96* App Store header
97
98=ios/AppStore/header.conf= sets the product page header's background and screenshots;
99appstore-kit's =render-header.sh ios/AppStore= renders it.