A small scrappy open source Pebble companion app, based on the libpebble3. It's not meant as a grand replacement for the original app, but as a small app with the functional UI and the features that I care about.
This is a Kotlin Multiplatform (KMP) project supporting both Android and iOS.
Supported features:
- Connecting to the LE watches
- Installing / uninstalling watch apps via PBW
- PebbleKit JS (including configuration pages)
- Basic notification config
- Music control
- Calendar sync
- PebbleKit Android (for Notification Center, Music Boss etc.), albeit it's slower on the Pre-P2 watches
- Developer connection
- Voice recognition (on Android 13+)
- Calendar filtering
- macOS (required for iOS development)
- Xcode 16.2+ (for iOS)
- Android Studio (for Android and JDK 21)
git clone <repository-url>
cd rebble_kmp_pocThe project has multiple submodules (including nested ones) that must be initialized:
# Initialize all submodules
git submodule update --init --recursive
# Initialize nested submodules in libpebble3
cd libs/libpebble3
git submodule update --init --recursive
cd ../..
# Initialize speex codec source
cd libs/kotlin-speex
git submodule update --init --recursive
cd ../..The project requires JDK 21. The easiest way is to use Android Studio's bundled JDK.
Update gradle.properties:
# Configure Gradle to use Java 21 (Android Studio bundled JDK)
org.gradle.java.home=/Applications/Android Studio.app/Contents/jbr/Contents/HomeCreate local.properties in the following directories with your Android SDK path:
Root project (local.properties):
sdk.dir=/Users/<your-username>/Library/Android/sdkAlso create the same file in:
libs/libpebble3/local.propertieslibs/kotlin-speex/local.propertieslibs/libpebble3/PebbleKitAndroid2/local.properties
# Build debug APK
./gradlew :app:assembleDebug
# Install on connected device
./gradlew :app:installDebugThe APK will be at: app/build/outputs/apk/debug/micropebble-debug.apk
# For real device (arm64)
./gradlew :shared:linkDebugFrameworkIosArm64
# For simulator (Apple Silicon)
./gradlew :shared:linkDebugFrameworkIosSimulatorArm64The Xcode project has a build script that needs the correct JAVA_HOME.
In iosApp/iosApp.xcodeproj/project.pbxproj, find the shellScript section and ensure JAVA_HOME is set correctly:
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"cd iosApp
# Build for real device (arm64)
xcodebuild -project iosApp.xcodeproj \
-target iosApp \
-configuration Debug \
-sdk iphoneos \
-arch arm64 \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NOThe app will be built at: iosApp/build/Debug-iphoneos/iosApp.app
- Open
iosApp/iosApp.xcodeprojin Xcode - Connect your iPhone via USB
- Select your device in the top toolbar
- Go to Signing & Capabilities and configure your Apple Developer Team
- Click Run (⌘R)
Note: First time running on a device, you may need to trust the developer certificate in Settings > General > VPN & Device Management on your iPhone.
Update gradle.properties and the Xcode build script to point to a valid JDK 21 installation.
Create local.properties files in all project directories (see Step 4 in Getting Started).
If you see Android Gradle Plugin version conflicts, update libs/kotlin-speex/gradle/libs.versions.toml:
[versions]
agp = "8.13.0" # Match the main project's versioncd libs/kotlin-speex
git submodule update --init --recursiveThis is a type conflict in libpebble3 - cast LibPebbleSwift.CLLocation to platform.CoreLocation.CLLocation.
rebble_kmp_poc/
├── app/ # Android app module
├── shared/ # KMP shared module (iOS + Android)
├── iosApp/ # iOS app (Xcode project)
├── libs/
│ ├── libpebble3/ # Core Pebble library (submodule)
│ │ └── PebbleKitAndroid2/ # PebbleKit (nested submodule)
│ └── kotlin-speex/ # Speex codec (submodule)
├── gradle.properties # JDK configuration
└── local.properties # Android SDK path (create this)
Process for updating all library versions:
- Update Gradle version
- Find latest version and the checksum for -all version from https://gradle.org/release-checksums/ (We use SHA to secure against wrapper attack, see https://blog.gradle.org/wrapper-attack-report)
- Run
./gradlew wrapper --gradle-version VERSION --gradle-distribution-sha256-sum SHA, where you substituteVERSIONandSHAwith the info found in the previous step.
- Open
libs.tomlfile and check if any versions marked with@pinhave been unblocked and can now be updated - Run
./gradlew versionCatalogUpdate. - Sync the project, build the app and run all tests to make sure everything still works.
- Run
detektDebuggradle task to find any new deprecated code - For any new deprecated code found by the search:
- If the fix is trivial, fix it immediately as part of the update commit
- Otherwise, make a tech debt ticket and add a @Suppress with the ticket number (and/or discuss with the team how to address it)
To easily add new modules, first enable project templates (you only need to do this once). Open Android Studio's Settings, go to "File and Code Templates" and set Scheme to "Project".
Then, to create a new module:
- Right click on the root in the project window, select New and then the project type you want

- Add module to
settings.gradle.kts - Add module to app's
build.gradle.ktsasimplementation(projects.newModule)) - Remove leading space from all generated
.gitignorefiles (workaround for the https://youtrack.jetbrains.com/issue/IJPL-2568)
Every feature should contain following modules:
feature-namedata- data module with all non-UI logic (such as repositories). No otherdataoruimodule should depend on this (except for tests).api- interfaces and data models exposed to other modules. This module should generally contain no logic to speed up builds.ui- Module containing feature's ui (Screens / Fragments / ViewModels). No otherdataoruimodule should depend on this (except for tests).test(optional) - Module containing test helpers for faking stuff exposed in theapimodule
If your module contains instrumented tests, you must enable them with the following call:
custom {
enableEmulatorTests.set(true)
}App icon is watch-variant by the GreenTurtwig.



