Apple Watch has won the love of users and has become not just an accessory but a practical and convenient device. A functional complement to your smartphone effectively reduces the time of using the phone and makes it easier to access many features.
The smartwatch is paired with the iPhone to display notifications, answer calls, and send messages.
The main values of the Apple Watch are usefulness, unobtrusiveness, and mobility, as a person uses a watch on the go.
The accessory has become an independent device. That is why an issue of developing separate applications has arisen. Most often, the watch apps depend on the applications on the associated iPhone. Can you create an independent application for the Apple Watch and how to do it — let's try to figure it out.
How does the Apple Watch work?
Typically, watchOS apps are built into iOS apps. Whenever an iOS app containing a watchOS app inside is installed on an iPhone, it will be automatically transferred to the watch via Bluetooth if the devices are connected.
The watch itself runs on the operating system called watchOS. It is based on iOS and has many similar features.
To allow developers to create their own watch solutions, watchOS has WatchKit API — a framework that provides the infrastructure for building watchOS apps.
The application usually consists of two parts: WatchKit app, WatchKit extension. An app is loaded into the watch. It includes all screens and static resources. The purpose of the WatchKit app is to determine that the were some interactions performed by the user and pass the request to the WatchKit extension. The extension runs on the associated iPhone, implements the application's logic, and updates the data for the WatchKit app.
The key difference between an app and an extension is that the app is responsible for the UI, the extension — for the operation part. In the last one, controllers and resources are located.
Let's consider the operation and interaction of both parts in more detail.
Some user actions or responses to notifications can launch a WatchKit app. Once launched, the screen displays interface elements the user can interact with to perform specific tasks.
Extensions are separate binary files. They are part of the parent application on iOS. Once you install the iOS app on the iPhone that contains the WatchKit extension, it becomes available on the watch. After the application is launched on the watch, WatchKit will run the appropriate extension on the connected iPhone and start the app's initialization.
The dependence of two devices on each other imposes usage restrictions. Therefore, Apple introduced independent watch applications.
Independent Watch Apps
In 2019, Apple started the development of independent watch apps that do not require a companion app on the iPhone. So now you can build an app for the watch and publish it in the Watch App Store.
There are two options available in Xcode when starting a new project: Watch App and Watch App for iOS App. These options allow you to choose between building a dependent or fully independent application for the Apple Watch.
Independent applications are a big step forward for both users and developers. Especially for users who dream of using a compact and functional watch without a phone.
You can use a watch as a key (for the car, the house), while there is no need to take your phone. Morning runs and sports can also become more mobile: heart rate, pace, and even a music player will be available on your wrist. In addition to such things as an alarm, notes, and other valuable stuff for organizing, you can even play games on your Apple Watch. For example, play chess to kill time while waiting for an appointment.
Building watchOS apps on no-code
Applications for most Apple devices are created in the Swift language using the SwiftUI framework, a set of tools to create an interface of the app. It refers to declarative programming, which significantly simplifies development. In declarative programming, you don't need to write a detailed algorithm that describes how to get the desired result. You need to explain how you want to see the user interface.
It is how SwiftUI works: it asks to specify the result and not "how" it should happen. SwiftUI is already considered low-code technology for its minimum code.
Moreover, if you write SwiftUI code for your application without global changes, it will work on any Apple device: watches, iPhones, and even TVs.
Moving development to a no-code platform like AppMaster makes it even easier. AppMaster already uses Swift to develop iOS applications.
You can work with the platform in three scenarios:
- create a completely independent watchOS application and publish it in the store;
- convert an existing iOS app and create a dependent watch app;
- develop an application pair: for iOS and watchOS.
The no-code tool provides access to a flexible drag & drop designer, allowing you to assemble application screens without writing code. The same is with the app's logic: you use separate blocks to build business processes.
AppMaster does all the work for you. The tool generates the source code for your application. You only direct it by building the business logic of the app. The database also can be built using visual blocks — data models.
Everything is based on drag & drop technology, which significantly optimizes the development process.
What are the difficulties in developing applications for watches?
The watch has a small screen and a minimal list of elements that can be added. There are also restrictions on how these elements can be arranged.
You can solve the problem by connecting a third-party builder, for example, using some external tool to create the app's interface and entrusting the backend part to AppMaster. The platform makes it easy to connect third-party services and create integrations.
Answering our question, "can you build a watchOS app on a no-code platform?" we say — yes. No-code will make development more accessible, but you may run into a few design limitations that can be worked around by including a design-builder.
Should You Build Watch Apps?
The Apple Watch opens opportunities for developers to build new exciting solutions. The market is just developing, meaning the competition is not at a very high level yet. You can come up with something worthwhile and get inspiration from users who don't want to depend on their smartphones. With tools like AppMaster, you can easily implement any of the ideas.