Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
with:
node-version: lts/*
cache: "pnpm"
# capacitor-hinge is a private git dependency; HINGE_DEPLOY_KEY is a
# read-only deploy key on that repo.
- name: Load capacitor-hinge deploy key
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.HINGE_DEPLOY_KEY }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
with:
node-version: lts/*
cache: "pnpm"
# capacitor-hinge is a private git dependency; HINGE_DEPLOY_KEY is a
# read-only deploy key on that repo.
- name: Load capacitor-hinge deploy key
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.HINGE_DEPLOY_KEY }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify PostHog configuration
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# capacitor-hinge is a private git dependency; HINGE_DEPLOY_KEY is a
# read-only deploy key on that repo.
- name: Load capacitor-hinge deploy key
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.HINGE_DEPLOY_KEY }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Tauri app bundle
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
ci:
uses: ./.github/workflows/ci.yml
# Passes HINGE_DEPLOY_KEY through for the private capacitor-hinge git dependency.
secrets: inherit
permissions:
contents: read

Expand Down
1 change: 0 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ Store record — it does **not** share the macOS bundle identifier.
| Artifact | sandboxed `.pkg` | `.ipa` |
| Script | `scripts/build-appstore.sh` | `scripts/build-ios.sh` |


### Build and upload

```sh
Expand Down
36 changes: 32 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,22 @@ <h3>Settings</h3>
aria-label="Close"
>
<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">
<line x1="2" y1="2" x2="14" y2="14" stroke="currentColor" stroke-width="1" />
<line x1="14" y1="2" x2="2" y2="14" stroke="currentColor" stroke-width="1" />
<line
x1="2"
y1="2"
x2="14"
y2="14"
stroke="currentColor"
stroke-width="1"
/>
<line
x1="14"
y1="2"
x2="2"
y2="14"
stroke="currentColor"
stroke-width="1"
/>
</svg>
</button>
</div>
Expand Down Expand Up @@ -513,8 +527,22 @@ <h3>Info</h3>
aria-label="Close"
>
<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">
<line x1="2" y1="2" x2="14" y2="14" stroke="currentColor" stroke-width="1" />
<line x1="14" y1="2" x2="2" y2="14" stroke="currentColor" stroke-width="1" />
<line
x1="2"
y1="2"
x2="14"
y2="14"
stroke="currentColor"
stroke-width="1"
/>
<line
x1="14"
y1="2"
x2="2"
y2="14"
stroke="currentColor"
stroke-width="1"
/>
</svg>
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.0;
MARKETING_VERSION = 1.0.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = eu.maxwase.kami.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -335,7 +335,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.0;
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = eu.maxwase.kami.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"author": "xcode",
"version": 1
}
}
}
8 changes: 4 additions & 4 deletions ios/App/App/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"info": {
"version": 1,
"author": "xcode"
}
}
}
2 changes: 1 addition & 1 deletion ios/App/App/Assets.xcassets/Splash.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"version": 1,
"author": "xcode"
}
}
}
28 changes: 28 additions & 0 deletions ios/App/App/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,34 @@
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
<dict>
<!-- PostHog exception autocapture (capture_exceptions in
analytics.ts): unhandled JS errors and rejections. -->
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<!-- PostHog resolves the request IP to country/city (GeoIP) on
ingestion; the IP itself is not exposed in events. -->
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCoarseLocation</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
Expand Down
14 changes: 14 additions & 0 deletions ios/App/CapApp-SPM/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ios/App/CapApp-SPM/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.5.1"),
.package(name: "CapacitorBrowser", path: "../../../node_modules/.pnpm/@capacitor+browser@8.0.4_@capacitor+core@8.5.1/node_modules/@capacitor/browser")
.package(name: "CapacitorBrowser", path: "../../../node_modules/.pnpm/@capacitor+browser@8.0.4_@capacitor+core@8.5.1/node_modules/@capacitor/browser"),
.package(name: "MaxwaseCapacitorHinge", path: "../../../node_modules/.pnpm/@maxwase+capacitor-hinge@git+ssh+++git@github.com+maxwase+capacitor-hinge.git+276b55415_91485003438d561f256d12448cd1b2de/node_modules/@maxwase/capacitor-hinge")
],
targets: [
.target(
name: "CapApp-SPM",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
.product(name: "CapacitorBrowser", package: "CapacitorBrowser")
.product(name: "CapacitorBrowser", package: "CapacitorBrowser"),
.product(name: "MaxwaseCapacitorHinge", package: "MaxwaseCapacitorHinge")
]
)
]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build:ios": "KAMI_TARGET=capacitor pnpm build",
"ios:sync": "pnpm build:ios && cap sync ios",
"ios:open": "cap open ios",
"ios:run": "pnpm ios:sync && cap run ios",
"ios:run": "scripts/run-ios-sim.sh",
"ios:assets": "capacitor-assets generate --ios --assetPath public/icons/capacitor --iosProject ios/App",
"build:ios:appstore": "scripts/build-ios.sh",
"build:ios:appstore:upload": "scripts/build-ios.sh --upload"
Expand All @@ -47,6 +47,7 @@
"dependencies": {
"@capacitor/browser": "^8.0.4",
"@capacitor/core": "^8.5.1",
"@maxwase/capacitor-hinge": "git+ssh://git@github.com/maxwase/capacitor-hinge.git#master",
"@capacitor/ios": "^8.5.1",
"@tauri-apps/api": "^2.11.1",
"@tauri-apps/plugin-opener": "^2.5.4",
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ allowBuilds:
esbuild: true
# Native image codecs, used by @capacitor/assets to generate iOS app icons.
sharp: true
# Git dependency; its prepare script builds dist/, which is gitignored upstream.
# Pinned to the locked commit, so bumping capacitor-hinge means updating this too.
"@maxwase/capacitor-hinge@git+ssh://git@github.com/maxwase/capacitor-hinge.git#276b55415d4b9a6c655f8c44c9274c29b01bbcdf": true
4 changes: 4 additions & 0 deletions privacy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ <h2>4. Analytics (only with your consent)</h2>
Standard technical data PostHog records: approximate (coarse) region derived
from IP address, device/browser type, and screen size.
</li>
<li>
Error reports — when the app hits an unexpected error, the error message and
stack trace (no personal content) are sent so the bug can be fixed.
</li>
</ul>
<p>
PostHog acts as our data processor. Your consent choice is remembered using your
Expand Down
60 changes: 60 additions & 0 deletions scripts/run-ios-sim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
# Build kami and run it on an iOS simulator.
#
# Usage:
# scripts/run-ios-sim.sh # first booted simulator
# scripts/run-ios-sim.sh "iPhone Duo" # by device name
# scripts/run-ios-sim.sh <UDID> # by UDID
#
# This replaces `cap run ios`, which is broken on Xcode 27: the Capacitor CLI
# opens the simulator through a hardcoded Developer/Applications/Simulator.app
# path, and Xcode 27 renamed that app to Device Hub and moved it to
# Contents/Applications. Everything here goes through `xcrun simctl` instead,
# which is unaffected by the rename.
set -euo pipefail

cd "$(dirname "$0")/.."

APP_ID="eu.maxwase.kami.ios"
DERIVED="build/ios-sim"

target="${1:-}"
if [[ -z "$target" ]]; then
udid="$(xcrun simctl list devices booted -j | node -e '
const d = JSON.parse(require("fs").readFileSync(0, "utf8")).devices;
const all = Object.values(d).flat();
process.stdout.write(all.length ? all[0].udid : "");
')"
[[ -n "$udid" ]] || { echo "No booted simulator. Pass a device name or UDID." >&2; exit 1; }
else
udid="$(xcrun simctl list devices available -j | node -e '
const arg = process.argv[1];
const d = JSON.parse(require("fs").readFileSync(0, "utf8")).devices;
const all = Object.values(d).flat();
const hit = all.find((x) => x.udid === arg) || all.find((x) => x.name === arg);
process.stdout.write(hit ? hit.udid : "");
' "$target")"
[[ -n "$udid" ]] || { echo "No simulator matching: $target" >&2; exit 1; }
fi

echo "==> Simulator $udid"
pnpm run ios:sync

echo "==> Booting"
xcrun simctl bootstatus "$udid" -b
open -a "$(xcode-select -p)/../Applications/DeviceHub.app" || true

echo "==> Building"
xcodebuild build \
-project ios/App/App.xcodeproj \
-scheme App \
-configuration Debug \
-destination "id=$udid" \
-derivedDataPath "$DERIVED" \
-quiet

echo "==> Installing"
xcrun simctl install "$udid" "$DERIVED/Build/Products/Debug-iphonesimulator/App.app"

echo "==> Launching"
xcrun simctl launch "$udid" "$APP_ID"
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
"../public/icons/icon.ico"
]
}
}
}
Loading
Loading