announced wearable support. This post covers both wearables in detail: how watchOS works, how Wear OS differs, and the small amount of code you write to reach either one.
What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at
That is a screenshot from our test framework, which was never designed for a watch: it still has a text field. Because that is a Codename One text field it renders correctly and "just works" right up until you try to edit in it, which on a watch would not give the result you want. A UI actually built for the watch would leave the text field out and route input through the watch instead. It is a useful reminder that the same components render here, and that you still design the screen for the watch.
The watch app is rooted in a generated SwiftUI @main shell that hosts the Codename One frames and forwards Digital Crown and tap input into the runtime. On device the watch slice compiles for arm64_32. In the default companion distribution the watch app is embedded in your iOS app so the pair installs together; a standalone distribution builds a watch-only product instead.
The diagram below is the shape of it. CN.isWatch() is true on both wearables, so you adapt the UI for a small screen either way; what differs after that is the platform, not the check.
with the device and watchOS or Wear OS version.
SOCIAL SHARE CARD GENERATOR