Watch
Creating a Watch version of our App.
Watch
Creating a Watch version of our App.
0
0
Checkbox to mark video as read
Mark as read

Expanding your iOS app to Apple Watch is a fantastic way to enhance user experience by bringing key features directly to users' wrists. Apple Watch apps can be developed as standalone apps or extensions of existing iOS apps, allowing seamless interactions across both devices. This guide will walk you through the process of adding a Watch app to an existing iOS app project.

Setting Up the Watch App Target

To start, open your existing iOS project in Xcode and add a new Watch app target:

  1. Go to File > New > Target.
  2. From the target templates, select WatchOS and then App.
  3. In the configuration screen we've selected "Watch App for Existing iOS App", meaning that this Watch App will always depend on hte iOS App. Then for the "Testing System", you can select XCTest or Swift Testing for your Watch unit tests (in this example we selected none).

Xcode will create a new Watch app target in your project, along with additional folders and files for the Watch app interface and functionality, which are basically the same you found when you created your iOS App: Assets, ContentView and the main App file.


Running our Watch App

A new Scheme has been created for the Watch App, if you select it from the Scheme list, you'll see that the list of iOS simulators include a Watch simulator as well. Once an iPhone+iWatch simulator has been selected, you can run your Watch clicking the Play button.




If you want to simulate only your App, select the App Scheme back and run it as usual.

Signing your Watch App

In order to sign your new Watch App for release, you need to create an identifier and a profile for it (also a certificate but you will use the one you created for your iOS App). It's exactly the same you did for your iOS APP, check how to do it in our Certificates article.

As you can see, the Watch App bundle id is the same as the APP with an extra parameter, you can change the last part but it's important to keep the rest since this is an extension of it.

  • iPhone app bundle ID: com.myname.myapp
  • Watch app bundle ID: com.myname.myapp.watchkitapp

0 Comments

Join the community to comment

Be the first to comment

Accept Cookies

We use cookies to collect and analyze information on site performance and usage, in order to provide you with better service.

Check our Privacy Policy