Show Menu

Expanding your company? Need a developer?

Submit your 30 day Job Listing for FREE

watchOS 2 Hello World tutorial Logo

In this watchOS 2 Tutorial I am going to be showing you how to create the standard and simple Hello World application. This will give you an overview to creating WatchKit targets and deploying your application to the watch device itself.

Add WatchKit target

I am going to assume that you know how to create a blank new Single View Application and also have basic knowledge of how Xcode is layed out. For example, the Storyboard and Object Library etc.. You do? Fantastic. Ok, so the next thing were going to do is to add a new target into this application so that we can use the watchOS. you do this by going to:  File -> New -> Target.

watchOS 2 hello world tutorial add target

This will bring up this dialogue:

watchos watchkit app target

On the left hand side, click Watch OS and then select WatchKit App. As you can see, just above that is the option for Apple Watch. Do not click this option. Click Next.

You will then be presented with another dialogue window. Enter these details:

watchOS 2 hello world tutorial
  • Product Name: WatchOSHelloWorldTutorial
  • Organization Name: < > You can put anything here

Click Finish. That is the basics of your watchOS 2 Hello World application. If you build and run your app you will see something like:

watchOS 2 Hello World Tutorial Interface

watchOS 2 Hello World

So, This application doesn’t really say Hello World does it? Let’s fix that. What we’re going to do is to drag a UILabel from the object library, bottom right of Xcode onto your storyboard roughly in the center:

watchOS Hello World UILabel

Great, Now you had added a UILabel to your watchOS 2 Hello World application. Let’s run this app so we can see the result. Now, Things are a little different to just running the app. We need to make sure that we select the WatchKit app target to run. We can chose any simulator.

We also need to make sure that we select Apple Watch as an External Device from your iOS Simulator Hardware Menu option:

xcode external display watchos 2

That’s all folks, Re-Run your application and see your results.

watchos 2 tutorial final run

Congratulations, you have just created your first watchOS 2 Application.

watchOS 2 Tutorials

Interested in going further? Check out all our WatchOS 2 Tutorials

To re-cap. In this watchOS 2 Hello World Tutorial I showed you how to create your first watchOS application. I covered how to add a new WatchKit App Target into your project and how to drag a UILabel onto your storyboard.
finally, I showed you how to run your watchOS application on both the simulator and the Apple Watch Device.

Please leave any comments below, I hope you enjoyed it.

having issues?

We have a Questions and Answer section where you can ask your iOS Development questions to thousands of iOS Developers.

Ask Question

FREE Download!

Get your FREE Swift 2 Cheat Sheet and quick reference guide PDF download when you sign up to SwiftMonthly

Sharing is caring

If you enjoyed this tutorial, please help us and others by sharing using one of the social media buttons below.

Written by:

I work in the shadows. You can thank me by being a good soul.