Hedvig is a new approach to insurance currently available in Sweden, we belive in transparency hence we code in the open and publish all our source code here on Github, feel free to take a peek, if you are interested in working with us check out our jobs page.
🦉 It's just an insurance app for iOS
-
Install Xcode
get it from Mac App Store -
Install mise + tuist
scripts/install-tuist.sh -
Run post-checkout
scripts/post-checkout.sh
We use swift-format for formatting, it's ran on all staged files automatically in a pre-commit hook.
-
Install githooks
sh
scripts/githooks.sh -
Install swift-format
sh
scripts/install-swift-format.sh
-
Add LOKALIZE_TOKEN
echo
'export LOKALIZE_TOKEN="your_token_value_here"' >> ~/.zshrc -
After adding it, reload your shell config:
source ~/.zshrc -
run
scripts/translations.sh
Before release making sure you Cancel or release any pending releases on App Store Connect.
-
Go to
Actions->CreateRelease -
Click
Run workflow -
Wait for the build to complete and get processed by App Store Connect
-
Go to
Actions->IncreaseVersionNumber -
Enter desired App Store version number
-
Click
Run workflow
If you never edit Kotlin, you can ignore this section — run post-checkout.sh, build, and ship as normal. Xcode pulls HedvigShared automatically from a Swift Package and scripts/post-build-action.sh handles the rest. The setup below is for the inner loop when you are iterating on shared Kotlin code from the sibling android/ repo.
android/ ugglan/
└─ app/umbrella ──gradle──> HedvigShared.framework ──linker──> CoreDependencies.framework
(Kotlin code) (static archive, (carries the Kotlin
wrapper not in .app bundle) symbols at runtime)
umbrellais the Gradle module on the android side that exposes Kotlin code to iOS. Its build product,HedvigShared.framework, is what iOS imports.- The framework is
isStatic = true, so its archive is statically linked intoCoreDependencies.frameworkat workspace build time — that's where the Kotlin code actually lives at runtime. TheHedvigShared.frameworkwrapper itself is a build-time linker artifact and is removed from the.appbundle bypost-build-action.sh. - Released mode (default):
HedvigShared.frameworkcomes from a published Swift Package built byumbrella.yml— round-tripping a Kotlin change through CI takes ~25 minutes. - Local mode: a Tuist toggle + a gradle pre-build phase rebuilds the framework from your sibling
android/checkout on every Xcode build, ~5–10s per Kotlin change.
Check out the android repo as a sibling. The directories must be named exactly android and ugglan:
<parent>/
├── android/
└── ugglan/ ← you are here
Switch to local mode (close Xcode first):
scripts/use-local-umbrella.shThen open Ugglan.xcworkspace and build. Edit Kotlin, hit ⌘R; iOS picks it up.
Switch back to the published package before opening a PR:
scripts/use-released-umbrella.shBoth scripts wipe Ugglan's DerivedData (mixing artifacts from both modes silently corrupts signatures) and refuse to run if Xcode is open. Run scripts/umbrella-status.sh to see which mode you're currently in.
scripts/post-build-action.sh does the iOS-side surgery that makes both modes work — removes the static HedvigShared.framework from the bundle, lifts compose-resources/ to the right path for Bundle.main, re-signs the app. Read the comments in the script if you ever debug an install error or a MissingResourceException.