To go with my new Apple Watch Kickstarter, I’ve put together a 16-minute video on how to make an Apple Watch app. We’ll see how to add buttons and labels to your app, and make a simple guessing game similar to the ‘How Many Fingers’ app in my Complete Web Developer Course.
I hope you enjoy making your first Apple Watch app!
Hear about everything Rob's doing
Join the newsletter to be the first to hear about Rob's courses and training.
Nice and really valuable content! Now I can create my first app for the new coming Apple Watch! Thanks Rob =D
Awesome Rob! Really enjoying the course. Starte this weekend, about a quarter done, and was already wondering about watchkit/watch examples. Can’t wait to check this out!
Nice work
Excited to try the quick Awatch app, but nothing showing up on the simulator. I believe I’ve got the code right (copied below). If I’m the only one, it’s just me.
Thx for your courses. Really learning a lot.
Ted
//
// InterfaceController.swift
// Apple Watch How Many Fingers WatchKit Extension
//
// Created by Beta on 11/24/14.
// Copyright (c) 2014 Beta. All rights reserved.
//
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet weak var numberLabel: WKInterfaceLabel!
@IBAction func buttonTapped() {
var randomNumber = String(arc4random_uniform(5))
numberLabel.setText(randomNumber)
}
override init(context: AnyObject?) {
// Initialize variables here.
super.init(context: context)
}
}
Have you dragged the label and button in? Try starting again and following along exactly with the video
Thanks. I had the code correct, but had missed specifying the “Watch App” version prior to running the simulator. Thus nothing was being sent to/displayed on the Apple Watch screen.
Rob, this is a great promo tutorial. Thank you!
Wishing you success in your lovely job! =)
Nice intro Rob. Looking forward to the course. One thing though, you never will get 5 fingers here. It should be
var randomNumber = String(arc4random_uniform(6))
This will randomly choose a number from 0 - 5
If you want to eliminate 0 and have a random number from 1 - 5, then it should be
String(arc4random_uniform(5) + 1 )
You’re right thanks Stewart! I guess watches only have 4 fingers…