082 iPhreaks Show - WatchKit with Carl Brown

Download MP3

The panelists talk about WatchKit with Carl Brown.


[This episode is sponsored by Hired.com. Every week on Hired, they run an auction where over a thousand tech companies in San Francisco, New York and L.A. bid on iOS developers, providing them with salary and equity upfront. The average iOS developer gets an average of 5-15 introductory offers and an average salary offer of $130,000/year. Users can either accept an offer and go right into interviewing with a company or deny them without any continuing obligations. It’s totally free for users, and when you're hired they also give you a $2,000 signing bonus as a thank you for using them. But if you use the iPhreaks link, you’ll get a $4,000 bonus onset. Finally, if you're not looking for a job but know someone who is, you can refer them on Hired and get a $1,337 bonus as thanks after the job. Go sign up at Hired.com/iphreaks]**[This episode of iPhreaks is brought to you, in part, by Postcards. Postcards is the simplest way to allow you to feedback from right inside your application. With just a simple gesture, anyone testing your app can send you a Postcard containing a screenshot of the app and some notes. It’s a great way to handle bug reports and feature requests from your clients. It takes 5 minutes to set up, and the first five postcards each month are free. Get started today by visiting www.postcard.es]****[This episode is brought to you by Code School. Code School offers interactive online courses in Ruby, JavaScript, HTML, CSS and iOS. Their courses are fun and interesting and include exercises for the student. To level up your development skills, go to iphreaksshow.com/codeschool]****CHUCK: Hey everybody and welcome to episode 82 of the iPhreaks Show. This week on our panel we have Andrew Madsen. ANDREW: Hello from Salt Lake City. CHUCK: Jaim Zuber. JAIM: Hello from snowy Minneapolis. CHUCK: I’m Charles Max Wood from DevChat.tv and this week we have a special guest, and that is Carl Brown. CARL: Hello, from Austin, Texas. CHUCK: Now you’ve been on the show before. Do you want to just do a brief introduction anyway for those that missed the last one? CARL:**Sure. I’m a freelance iPhone developer, or iOS developer, in Austin, Texas. I’ve been a conference speaker. I wrote a book called App Accomplished published by Addison-Wesley; it came out a couple of months ago. And I’m really excited about iKit. I’ve spent some time looking [inaudible] and doing conference talks about Internet of Things and that kind of stuff, and I see this is an extension of that, so I’m really excited about the whole WatchKit thing.**ANDREW:**That was kind of funny; everybody was calling it the iWatch and I think people still do call it the iWatch and you just called it iKit [Chuckling]. It’s even made its way to WatchKit; I don’t think I’ve heard anyone say that.**CHUCK: That’s awesome. CARL: I’m sure I’ll get it wrong off and on. I’ve been calling it the iWatch for a year now, probably. ANDREW: And we’re lucky with the iPhone because everybody called that the iPhone and then it was actually called the iPhone. They seem to be moving away from that. CARL: Well I think the Apple Watch is kind of like the Apple TV. I’ve gotten to the point where I’m really good at typing Opt-Shift-K now to get the little Apple symbol when I’m typing Apple words. I think they’re trying to do more Apple branding. ANDREW: Yeah, I don’t think it’s a bad thing. CARL: I don’t think so either. CHUCK: Yeah, that makes sense to a certain degree from that standpoint. JAIM:**Because there are still 15 people in the world who haven’t heard of Apple [chuckling].**CARL: Well I think to some extent there are a lot of other things that have been called i-whatever, and so if you got a bunch of other iFood or i-tablet, it’s a lot harder to copyright that and do legal stuff with that. But if you actually put Apple in front of it, it’s a whole lot harder for other people to try to clone it. That might be why they’re going that way. I don’t know. JAIM: I think that makes sense. I made a watch out of actual apples and called it Apple Watch, so let’s see how that pans out. CHUCK: I was going to say, I’m going to make one that’s shaped like an apple and call it the Macintosh Watch. ANDREW: Yeah, I don’t think you’ll get very far, Chuck, but Jaim, I like your idea. JAIM: If you get hungry – there you go! CHUCK: What time is it? I can’t tell anymore! CARL: I hate my watch! CHUCK: I’ve heard a lot of conflicting things about the Apple Watch – I almost called it the iWatch – and what it’s capable of. I really haven’t had a lot of time to dig into the watch’s capability, but it sounds like it’s mostly an extension of apps on your phone. CARL: Well, yes. There are some questions about whether that will always be true to some extent. I don’t see a full-blown App Store on the actual Apple Watch at some point in the future; it’s just not a good interface to buy things. I’m personally expecting that no matter when we get our “native apps” for the watch, which will probably be next year sometime, my guess is they’re still going to be tied to the phone somehow. But at the moment, basically none of the apps that you build or the connectivity between the phone and the watch works at all unless they’re within Bluetooth range, which hopefully at some point won’t be the case, and Apple has told us for their own apps isn’t the case. But at the moment, there isn’t anything that we, as developers, can build for the watch that will work if the watch isn’t near the phone, as near as we can tell. We don’t actually have the physical thing yet, so this is all guessing from what Apple has told us and from what the simulator does. Fundamentally, what we can do – two things that expected and one thing we didn’t. We expected there to be fancy notifications, which are a lot like the actionable notifications that we got on iOS 8. We expected there to be glances which are a lot like the dashboard widgets or today widgets that we got on iOS 8. What we didn’t really expect is this new extension thing where you actually have an app that sits as near as we can tell on the watch’s home screen, although simulators don’t give us a home screen so we’re not exactly sure. When that launches, all the actual computation – to good approximations of “all” – actually happen on the phone, and so the stuff that goes to the watch is fairly static. The watch responds to touches and long touches and that kind of stuff; it sends messages to the phone; the phone then responds, runs code, does whatever it needs to and sends responses back to the watch. So there’s not a lot of processing happening on the watch; the vast majority of what’s going to happen from a battery standpoint is going to be over Bluetooth, and so it’s fairly limited in what we can do, but it’s a lot more than what a lot of us were expecting. We were expecting primarily we were going to get notifications and glances and then we weren’t going to get any kind of actual application-looking thing until next year. ANDREW: But I think it’s still the case that they’re saying that something more full-featured is coming within the year. CARL: Yes. There’s a thing that they’re calling “Native Apps” and we’re not exactly sure what that’s going to be because it’s a preannounced products and they don’t tell us anything about preannounced products. We know this is coming; they’ve talked about it on the forums; we know it’s going to be next year sometime, we’re expecting it around WWDC time, and our expectation is that it’s going to be full-blown native apps that will work even if your phone isn’t next to it. But we don’t know what kind of limitations that’s going to be or how people are going to buy them, or how they’re going to get on the watch in the first place or any of that kind of stuff. ANDREW: Okay, cool. I haven’t actually worked with WatchKit, but I looked at it just like all the other iOS developers when it was announced a couple of weeks ago. I think it’s really interesting, the way they’ve done this. It seems like it’s essentially the V in MVC and all the view stuff are on the watch, but everything else is on the phone so the model and controller stuff is on the phone. You basically have outlets and actions going across thin air – is that about right? When I say thin air, I mean Bluetooth between the phone and the watch. CARL: Right. More or less, the V that they’ve got is actually a lot more limited than the V we have, the views we have, on iOS. We were expecting kind of like in the widget – or I was expecting – what we have in today widgets. We would have the ability to do drawRect and we would have the ability to do some core animation stuff – maybe limited, but something. Not the case at all. What goes on the actual watch are static things, so the user interface elements on the watch, you can’t subclass them if there is no drawRect; you can’t put your own user interface elements. You can’t make up your own interface stuff. There’s an image type and you can stuff images in there, but there’s no animation – none of that kind of stuff. There’s a sample code app called Lister that Apple gave us that has a 360 degree percent completion thing and they actually have 360 individual .pngs that they iterate through in order to be able to show you a progression. So it’s very old school, flip chart kind of thing, but that means that there’s not going to be much, if any, CPU usage actually happening on the watch. JAIM: What I’m hearing is the view is going to have things like text, some kind of images, but as far as creating a calculator, that’s somewhere down the road. We don’t have that kind of possibility without doing the notifications back to the actual watch where it’s actually doing the work. CARL: I mean, you can have buttons. James Thompson, who did PCalc, has already tweeted out a picture of a calculator that said, “This is not a product guarantee and product announcement.” There’s another app that I can stick in the show notes called Current – Watch Currency or something like that – where someone basically did a currency converter and a simulator on the watch and the posted the code to GitHub. You can have buttons that can type stuff but you can’t draw your own user interface elements. You can’t draw a graph, for example; you have to draw a graph on the phone in the ether, save that to a .png or a .jpeg or something like that, transfer that image over to the watch and have the watch display it. CHUCK: But you can display text and things like that. CARL: There’s a label item, so you can stick text in the label and you can stick text as the title of the button. There might be a TextView widget. I don’t remember one, but there might be. You’ve got TableViews and then in the TableView you can put labels that have text in them. But there’s no draw arbitrary text at a particular point kind of thing. The layout is all really rudimentary; you have these things call groups and groups are either horizontal or vertical and they can be nested, but that’s it. There’s no auto-layout; you don’t get to say, “This is the frame I want this at” – any of that kind of stuff. ANDREW: I think you’re hinting at something I read which is that there is no support for programmatic UI except for TableViews because that’s required, but you cannot define your entire UI in code; you have to use storyboards, right? CARL: Yes. And you can’t subclass the interfaces; you can’t create any of that kind of stuff. It’s all “Here’s a storyboard, here’s the list of elements that you can stick on the storyboard. Feel free to stick them on the storyboard however you want to. Wire them up to the code however you want to. Create actions that those buttons take when they get tapped” and that’s pretty much the extent of it. But, that said, that’s a lot more than we were expecting and there’s still a lot that we can do with that. CHUCK: One thing that I’m seeing here is that it may be able to interface with hybrid apps, can send notifications and things over to the watch, but you’re not going to be able to create those on the watch where you essentially have a WebView on there and tweak stuff around that way. CARL: Yeah, you’re not going to be able to do WebView. When there’s a notification, as I understand it, there’s a native notification that shows up for any kind of app – Facebook or a text or whatever. If the user actually engages with that by looking at the watch or raising their arm, it’ll change from what they call a quick look notification or a short look notification to a long look notification, and you can stick something on that like a button. In the keynote where they announced it, basically there was a “Hey, you’ve got a text message.” You look at the watch and it says, “Oh and there’s a reply button underneath it.” You tap the reply button and then you get a list of potential instant responses that you can have. As the app developer, you can say, “Okay, so here are the four buttons that I want to attach to a notification when the notification comes in” and so then the user can interact with any of those four buttons, but you can’t arbitrarily create your own user interface or pull up a WebView or any of that kind of stuff. CHUCK: And the only input you have is touch and long touch, and I guess the motion sensors in it. CARL: There is a text input field that we understand is going to respond to the microphone. CHUCK: Oh, okay. CARL: But right now, in the simulator, there’s a bug where that doesn’t work, and so we haven’t really gotten the chance to play with that yet. ANDREW: It seems to me, the way I read that is that it will be like text fields that are already on iOS where there’s a way to do dictation, but I don’t think we still get direct access to the audio coming in. CARL: You can’t get direct access to the microphone – they’ve told us that. You can’t get access to the sensors, so no accelerometer, no pedometer, none of that kind of stuff. You can’t get access to the heart rate; you can’t read that as an app developer. Hopefully you will be able to next year, but at the moment you can’t. It’s a fairly simple “Here’s a set of user interface elements that you can display and you can do glances which are fairly limited like the home widgets on the today widgets on the iOS 8 and you’ve got the notifications.” That’s pretty much the scope of what we can do. CHUCK: Now you’re saying that you can’t get the heart rate information off the watch, but can you interface through HealthKit and get it that way? Or is it just totally locked up? CARL: My expectation is that the heart rate information from the watch will end up showing in HealthKit. What I don’t know is how long that will take with the lag is going to be. That might be for historical purposes kind of insertion into HealthKit, or it might be a more real-time thing. When your app queries the heart rate data in HealthKit, you may or may not be able to get any useful information that’s current enough that you could react to that in the watch display. ANDREW: That’s what I understand, too. I actually have it from a good source that you can definitely pull it out of HealthKit, but it’s “not real-time” and there is no elaboration on that. But essentially, there could be quite a long delay, so just confirming what you said. CHUCK: Now the watch is also going to have NFC in it for Apple Pay, right? CARL: I believe so, yes. CHUCK: And my understanding is that nobody gets to touch the NFC except for Apple. CARL: That would be my expectation. ANDREW: That’s already true on the iPhone, so I don’t expect it to be different on the watch. CHUCK: I’ve seen some cool stuff done with NFC, Bluetooth Low Energy, but I was kind of hoping. Anyway. ANDREW: I guess the caveat is, that’s true right now but we never know what iOS 9 or whatever will bring. CARL: Yeah, I really hope we’re going to get access to some of this. Maybe not in NFCs, since it’s got payment information and all that kind of stuff potentially tied to it, but the heart rate stuff and all that kind of stuff, I really hope we’re going to get next year. There’s a bunch of fun things we can do with it. CHUCK: Yeah, with the accelerometer and things in the watch, you can basically do what the Fitbit Flex and Force do – stuff like that. So you can track all kinds of information about how someone is moving. I guess you can do that with a phone too, but since it rides in the pocket or in any number of other places, it may not – we just may not know what it means. Whereas the watch, it’s pretty clear. It’s on the end of your arm. CARL: Yes and no. I had, once upon a time, a Nike+ FuelBad that I ended up giving to my wife. The reason is I have a treadmill desk at home, and it doesn’t register the treadmill desk at all. And so I switched to a Fitbit that clips into my pocket so that it can actually register. CHUCK: That makes sense. CARL: With the watch or with whatever sensor, it entirely depends on how the user’s wearing it as to whether or not the information you get out of it is in any way useful to you. CHUCK: Yeah, that makes sense. I have a Fitbit Force that’s on my arm, and so if I had a treadmill desk it wouldn’t register for me either because my hands would be resting on the keyboard while I work. CARL: Right. And I’m at the point now where when I go downtown, which is fairly often – that’s where my client side is at the moment – I ride my bike to the train station and then take the train into downtown. If I got something on my wrist, it won’t register any kind of exercise while I’m on my bike, but I’ve got an app that’s on my phone that’s in my pocket that will register and it’s got GPS and all that kind of stuff. It depends on what you’re trying to measure to figure out whether a watch is a good fit for that or not. CHUCK: Yeah. I’m also speculating a little bit – do you think they’ll ever get to the point where the watch works over Wi-Fi or has a mobile antenna just in it so that it’s not necessary to have it tethered to the phone? CARL: I’ve heard rumors that it might have a Wi-Fi chip in it already for potential transfers. I have heard people talk about how it’s believed that under some circumstances, the handoff stuff between the phone and the Mac can actually use the ad-hoc Wi-Fi between them. I don’t know whether that’s true or not, but I can imagine that. I’m not sure when or if we’re ever going to get a watch that’s got a cellular modem on it, and personally, I don’t see a lot of value. Maybe time will prove me wrong, but I don’t see a lot of value in watch apps while you’re at your desk or while you’re in a place that’s got really good Wi-Fi. For me, the real value of the watch app is when you’re out and about and you’re in a place where getting your phone out is inconvenient. Like when I’m on my bike, or going to the train station, or when I’m packed into a commuter train and trying to get into my pocket to get my phone out is inconvenient. Those are the kinds of places that I think the watch apps can really shine – the places where it’s not convenient to have your phone or to get your phone. Whereas sitting at your desk, when you’ve already got your phone and you’ve already potentially got your iPad and you’ve already got your Mac or whatever computer you’re using, it may or may not be as useful. ANDREW: Yeah, I’m with you. I actually have a Pebble. I backed it on Kickstarter so I’ve had it since they started shipping them, and I really like it when I’m out and about. Particularly, I like it when I’m on vacation because I spend a lot of time out and about on vacation. At home, it’s really not useful. I’m sitting at a desk most of the time and have my computer and my phone and having a watch – it’s not enough easier to look at a watch. CARL:**Yeah, I’m with you. I’ve got a Metawatch, which is a competitor to Pebble, and I like it but I don’t ever wear it while I’m actually typing for no other reason than it scrapes on the keyboard. If I happen to have it on and I sit down at my desk to type, I’ll take it off and set it next to my laptop while I’m typing, because it’s [inaudible] to type with. And it doesn’t really do anything for me while I’m sitting there because I’ve got a clock in the upper right hand corner of my screen. It’s when I’m out and I’m doing something or I’m shopping or whatever and I’m away from my office and away from the house that the real value of the thing shines. And I think the Apple Watch will be a lot the same way.**CHUCK: I want to push this back toward WatchKit a little bit. When you’re designing the interfaces, you said it’s all static stuff; you’re pretty limited on what you can do. You’re still using the storyboard interface to build them, correct? CARL: Correct. ANDREW: You have to. CHUCK: How is that different from the storyboard experience for the iPhone and the Mac? CARL: Well to one extent, in the storyboards in the iPhone and the Mac, you can make custom classes and that kind of stuff. You’ve got frames; you can set up by autolayout, you can say “I want this thing to be in this particular part of the screen” and you can have code behind, so it’s not just the storyboard but you can have code as well. In the watch, it’s only storyboards and you have a very limited set of things you do. You can’t set what pixel on the screen this thing is going to be in. You can say here’s a group that starts at the top of the screen; you can say “I want to center this,” you could say “I want it on the left or the right” but you can’t say “I want this to start at 10px x 10px and be 100 pixels wide and 100 pixes down.” That whole part of the storyboard piece that you’re used to has a much more limited functionality when you’re working with watch apps than it does when you’re working with iPhone or Mac apps. CHUCK: So did they just align top, middle, bottom, left, right, center? CARL: Pretty much. You create a group, and then in that group you can say “I want this thing on the left, I want this thing on the right” and then you can nest groups and you can stack them. You can put three groups on the screen – one at the top, one at the middle and one at the bottom – and then inside each one you put three things – one at the left, one at the middle and one at the right. If you set them all to left and you put three things in there, then just by the order that you put them in the storyboard, they’ll end up on the left and the middle and the right. CHUCK: Is there any sense of scrolling? So if you put four in there, would it scroll right and left? CARL: Glances and notifications don’t, I think. I know glances can’t. There is a TableView item, user interface, on the watch and so you can create rows and you stick things in those rows, and you can put data in there like text labels and that kind of stuff. Our expectation is that – they might have told us this – those TableViews are going to scroll by turning the watch crown, which is the only access we have to the watch crown, and probably also by the user swiping up. Although if you swipe it up from the very bottom you get the glance thing, like you swiping down from the top of the iPhone gets you the notification center. So there's an infinitely long, arbitrarily long TableView that you can stick stuff in that can be scrolled back and forth by the watch crown, but that’s as close to scrolling as we can really get, as near as I can tell. CHUCK: What do you mean by the watch crown? CARL: On the right hand side, if you watched the keynote, there are two user interface elements or buttons. One of them is like if you have an analog watch, there’s a dial on the right hand side and you can pull it out and change it to set the time and that kind of stuff. That’s called a crown, and that element on the right hand side of the Apple Watch lets you scroll up and down. You can see it in the keynote. Below that is a button that lets you pop up a list of your friends so you can message them or send them heartbeats or do whatever you want to do. Our expectation is scrolling that little crown thing is how we’re going to move up and down in TableViews. CHUCK: Is there a way to send commands back to the phone from the watch? CARL:**It’s pretty much one way, as near as I can tell. You can change an image on the screen, so you [inaudible] user interface element, here’s an image. You can say in your extension “Change this label to have this text” but you can’t programmatically scroll. You can’t make a particular part of the user interface scroll [inaudible] point. You can hide stuff, so you might be able to fake some amount of user interaction, but it’s pretty much supposed to be the watch. The user interacts with the watch; the watch sends you a thing that says “Hey the user pressed this button” and then the action that’s tied to that button gets triggered and you do in that whatever you’re going to do.**ANDREW: I want to ask a little bit about glances and notifications – the two things that we knew were coming. How does making a glance or using notifications differ from making the kind of apps that we can make right now? CARL: An app on the watch, you mean? ANDREW: Yeah. I guess there are three categories right there – notifications, glances and they’re calling it apps but that’s sort of separate from full-on native apps that we will get to later. I’m talking about of the three things we have available now, we’ve talked most about making apps. Can you talk a little bit about how glances and notifications work and how those differ from an app? CARL:**The glances are relatively static. As near as I can tell, they’re one page and the user gets to those by swiping up from the bottom of the screen. Your glance can be there; other glances from other apps can be there. Think of them like if you got iOS 8, if you got the notification screen, that list of “Here are all the widgets you can have on your home screen.” There’s the PCalc one that got rejected and came back, there’s What’s the Weather Today one, that kind of stuff. Glances are the watch version of that. You, as a programmer, can’t trigger those; the user picks whether they want that glance to be on their watch or not and then when the user scrolls to that glance, then you can respond with that fairly static view and put any data there you want. With notifications, a notification comes in and you can set a local notification or a notification could come in for a push notification. That gets sent to the watch; the notification pops up on the watch face, and then if the user chooses to interact with that, you get some callbacks that you can use to fill more detail in the notification and give the user some extra buttons they can push. But the functionality of a glances and notifications are fairly limited; there’s not a lot of extra stuff you can do. The number of user interfaces [inaudible] you can have is more limited. These are the two use cases for when things are triggered outside of your control.**ANDREW:**I’m particularly curious about notifications because I think most people have used notifications in their iOS apps, either push notifications of local notifications. What’s the API like for doing those on the watch? Are they something that, for example, for a local notification, is there just another API that you can use in your iOS app to push the notification off to the watch? Is it all just handled for you using the existing notifications [crosstalk]?**CARL: As near as I can tell the local notifications that you set up that go to the watch are pretty much the same if you’re trying to trigger them. That’s pretty much the same as you trigger them if you wanted it to be any other kind of notification. So you set your local notification just like you would before, now when that notification fires, if the user has a watch attached, theoretically that notification will show up on the watch instead. And then the storyboard of the notification, the long notification, that you have configured will then appear for the user and then if you’ve enabled buttons, they choose to interact with it, then those extra buttons will appear for the user as well. ANDREW: Okay, cool. It seems like it would make sense, but does that mean that notification support won’t work even for existing apps that haven’t done anything in particular? I’m thinking about Facebook. It seems like you want Facebook notifications to work on day one when you buy your watch without a brand new Facebook watch app. CARL: Right. I expect it Facebook will end up having watch extensions in their app, but any arbitrary notification will pop up with whatever the text notification was and a background of the icon of that particular application. Any arbitrary application that already has notifications, it’s got an icon. If those will show up on your pebble or they’ll show up on a Metawatch or whatever, they’ll show up on the Apple Watch as well. They’ll be a little prettier, and then if the user chooses to interact with that and the developer has chosen to create a watch extension that handles notifications and there is a suite of other things the user can do to interact with that at that point. ANDREW: Cool. CHUCK: I’m also wondering if you can use mechanisms like push notifications and have it preferably show up on the watch as opposed to on the phone. CARL:**I think so. The question is basically, when a push notification comes in and your app implements a normal notification like one that is in the notification center, and your app implements a watch notification, and there’s a watch that’s tied to the phone, where does that show up? Based on the iOS 8 and Yosemite stuff, my guess if freakin’ everywhere [chuckling] because at the moment I get a phone call and my phone goes off and my iPod touch goes off, my iPad goes off, my Mac goes off, my other Mac on the other side of the room goes off. So my guess is that when you get a new notification, it’s going to show up on the notification center on the phone, it’s going to show up on the notification center on the watch, and then wherever you choose to interact with that, the other ones hopefully will go away, although not always. They should. Hopefully at some point they will, but they don’t always at the moment. But in terms of you as an application, I don’t think you know or have any way of knowing until you get the call back, whether or not that user has a watch attached at the moment.**CHUCK: Gotcha. CARL: I don’t know for sure because we don’t have a watch we can play with yet, but my guess is that you as an app developer are expected to respond correctly, whether the user has the watch attached or not. And so you should respond – you got your normal actionable notification to show up in the notification center, sliding down from the top of the screen or whatever, and then you’ve got your actionable notifications that show up on the watch, and then you just wait for the callback to see which one of those the user picked, if any. CHUCK: One other question that I’m just wondering about here is, let’s say I write an app for the watch that does something, but I can’t think of anything off the top of my head. Anyway, it does this thing and I leave my phone at home and take off with my watch on. CARL: What we’ve been told is that won’t work. How that won’t work, we’re not sure. When the user taps on the home screen – presumably there’s a home screen. When the user taps on the home screen icon for that app, does it say, “Sorry, your phone’s not in range” and give them an error? Does it hide that icon completely so the user doesn’t have the option to tap on it? We’re not really sure. We know that those apps won’t function unless the phone is there, but what the user experiences of that, if they’ve told us, I haven’t seen it yet. CHUCK: Now as far as communicating with the watch, sending the notifications and things like that, I’m wondering, does it just look like the regular – I forget what we call them, the connections that we get out of the controller to the view and things like that? CARL: The IBOutlets and IBActions and that kind of stuff? CHUCK: Yeah. CARL: There’s a view life cycle process a lot like the way that views are set up, except that they all have different names. The way that you connect a particular button to its target is more or less the same in storyboard as you would otherwise. I don’t think you can do that problem programmatically, but you don’t have nearly as many options. With a button on an iPhone, you can say “Is this thing on touch up? I want it if it’s on touch down, I want it if it’s on two different touches on the same button, I want it –.” That kind of stuff. There are a bunch of different options on that panel and you could tie any of those to a particular method that gets called in the event that the user performs that action on that. And you’ve got gesture recognizers and all that kind of stuff. On the buttons on the watch, this thing is tied up to this one method and that’s the method that gets called when the user interacts with that, which I presume is going to be touch up, but I don’t actually know. From what I could tell, there’s only one interaction type. PETE: That’s surprising to me. So you’re saying that you literally can’t use anything other than storyboards? You can’t programmatically build up these interfaces at all? CARL: Correct. I mean, there’s an FAQ on the developer forums – which have been really helpful, by the way. The Apple developer evangelist folks have been really active in the forums about responding people’s questions and that kind of stuff. There’s a thread in the forum that says, “Everything that ends up on the watch.” At least all the user interface elements that end up on the watch have to be from the storyboard. There’s some manipulation you can do after the fact. For example, if you’ve got an imageView, a WKImageView or whatever they call it, on the watch, then you can programmatically change the image that goes into that and you can programmatically hide things and change the alpha of things, but you can’t programmatically create a new user interface element or any of that kind of stuff. PETE: I’m assuming that’s maybe because they’re just shipping a declarative thing over to the watch and then it’s not like regular iOS Cocoa stuff where you’ve just got classes that are just objects in the system. I guess they’re just declared and then shipped over there in some kind of declarative thing, and then you can’t really programmatically mess with them after that. CARL: Correct. PETE: Maybe. CARL: Yeah, that’s my understanding. What we seem to know – there are some people that have done some hacking on the watch, more or less. There’s a thing called – I want to say it’s Pepper UI Core. I’ll put a note in the show notes to that blog post. Basically, someone has reverse engineered it to fine the heterofiles, found the thing that actually runs on the watch, and so we know it’s running a version of UIS with a different kind of iOS, with a different kind of user interface stuff. But fundamentally, there is a UI view under the covers; it’s just from the point of view of us talking to WatchKit at the moment. We don’t get access to any of that. Everything’s got to be from a storyboard; it’s got to be static. PETE:**I mean, that makes sense that Apple have the philosophy of, they have their internal APIs that they let bake for a while [inaudible] smoothen off all the rough edges before they expose that API to us [inaudible] Apple developers. So I’m assuming they’re doing the same kind of thing here where internally, maybe they have access to do stuff programmatically, but they don’t want to expose it until they’ve figured out the right lower-level API to expose. Maybe.**CARL: Right. There are some questions and speculations about why that might be. Some people are speculating that what they’re really trying to do more than anything else is cut down on battery usage. There are some people that are speculating that the APIs aren’t in external developer phasing state yet, so maybe they’re no very documented very well; they’re not set up very well. There’s a whole bunch of little things that you have to do in order to get it to work at all, and it’s easy if you’re internal to be able to go poke the guy that wrote it and say, “Hey, how come this isn’t working?” But they don’t want that kind of support burdened on everybody. If all of us are trying to use it and they want to get where it’s documented enough before they give it to us. Some people are speculating that both of those might be true – we don’t really know, but we’ve got what we’ve got and we’ve got more than at least some of use expected, and we’ve been promised that next year we’re going to get more. I’m kind of happy where we are at the moment. I don’t know that I want to say I’m in the minority of that, but I know there are a lot of developers that are chopping at the bit for full access already. PETE:**That’s always going to be the case, right? Everyone’s always going to be whining that they don’t have the ability to reflash the operating system or something [chuckling].**CARL: Right. And I’m curious at how long it’ll be before somebody jailbreaks it. PETE: I’m surprised it hasn’t already happened. CARL:**Well, nobody’s got a [crosstalk].ANDREW:[Chuckles] Yeah.**CHUCK: Yeah. ANDREW: Nobody’s got one. PETE: Yeah, I suppose so. So if no one’s got a hold of them, how have they coped around to find this Pepper UI thing? CARL:**If they’re hacking the simulator and they’re making an assumption that the simulator behaves the same way and uses the same classes that the actual watch is going to do, which has been a safe assumption more or less so far, but may or not be [inaudible] with the watch, we don’t actually know. Now there are some people who have actually built watches using that framework. It’s a private framework; you couldn’t possibly get it through app review, but there are some people who have built apps using that actual framework what run on an iOS device to prototype and play with what kinds of things might happen on a watch at some point.**CHUCK: That’s interesting. CARL: Yeah, that’s the same kind of thing that people were doing back in iOS 1.0 before the actual SDK came out. There were a bunch of people that jailbroke their phones and dumped the whole runtime libraries and built this really complicated toolchain so they could get apps running on the device at all back before we were allowed to and before there was an App Store. People are always going to end up doing something like that, and more power to them. I just don’t have time for that, but I think it’s kind of cool. ANDREW:**For people who don’t know, the first version of Twitterrific, which is a pretty popular Twitter client for iOS, the first version of that was made before the iOS SDK was public and before there was an App Store [inaudible] with that jailbroken, reverse-engineered toolchain. It was pretty impressive at the time and it’s still pretty impressive.**CARL: Yeah. Loren Brichter – whatever his name is – all of his stuff is really impressive. Letterpress is really impressive. He’s the guy that came up with Pull To Refresh, so. ANDREW: I’m not disagreeing there but Twitterrific is from The Iconfactory. CARL: Oh, I’m sorry. ANDREW:**That was Craig Hockenberry and [crosstalk].**CARL: Yeah, you’re right. My bad. I’m thinking of Tweetie. ANDREW: Right, yup. So the thing I’m kind of curious about is I haven’t really talked to a lot of other developers that are actually working with the new WatchKit stuff yet, but I’m curious to know what kinds of apps people are planning to add WatchKit support too or make an app for. Is there anything that you’re working on that you want to talk about, Carl? CARL: Two things. First off, I’ll stick this on the show notes too, but there was a Hackathon that actually occurred last week in San Francisco or the south Bay or something like that, and I didn’t go to it. They have a list of the projects that people did during the Hackathon and the judging and all that kind of stuff up on their site, which I think is hackathon.watch or something like that. Like I said, I’ll put a note in the show notes. And so you can go and look at what the different people were thinking about during that kind of initial “Okay, we’ve had this thing for two days; let’s see what we can build with it” euphoria. I don’t know how representative that is of what people are actually spending their time on, but that’s more representative than thinking of things on your own. Personally, like I said earlier, I’m thinking about a particular case where I every day – or not every day, but several days a week – ride my bike to the train station, take the train downtown, walk to the office, and then walk back to the train station, ride the train back home or back up here and then ride my bike back home. There are lots of times during that that I want pieces of information like how far I am from the train station while I’m riding my bike and when does the next train leave, that are very inconvenient to try to get my phone out of my pocket while I’m trying to ride my bike and a car is driving behind you way too fast. So I’m thinking about the kinds of apps I can build for that particular situation, and there might be other situations that pop up, but primarily those situations where trying to get my phone out is inconvenient. I’m guessing that other people are going to be doing the same kind of thing. I know that there are people playing with things like calculators on the watch, and I’m guessing people will do it just to do it, but how useful that will be and how many people actually respond to that, I don’t know. But then again, I had a conversation with a co-worker many years ago when the iOS App Store – iPhone App Store – was about to open back then, and he wrote an app that was just a white screen to use as a flashlight, and I laughingly said that no one was actually going to use that and lots of people used that. I don’t know that I necessarily the person to say, “I don’t think anyone will actually use a calculator on their watch with their phones available.” CHUCK: I want to ask a question about the particular scenario that you posited there, because when the next train comes, for example – are you just going to have an app on your phone that periodically pings your watch and says, “The next train is whenever,” or is there some kind of way of querying things, either by using Siri or something else that would allow you to then send the notification to your phone? CARL: My expectation for how I’m going to end up doing this is basically code in when the train is expected to leave. There’s a published train schedule; as far as I know, there’s not an API that I can get to, although in some metropolitan areas, there are. There’s not an API that I can get to that says, “This train is running three minutes late” or that kind of thing. So if I know when the train is supposed to leave, and in theory I know how long it’s going to take me to lock my bike up and get to the train platform from the place where my bike is locked up, then I know how long I have between right this instant and when I need to be locking my bike up. I can say, “Hey you’ve got an extra couple of minutes. You’re ahead.” Or “At this point in your ride, you’re a minute behind. You need to pick the pace up.” CHUCK: Okay, so you would just tell your app “I’m heading to this train station and I want to go north or south or to whatever line” and then it would say, “Okay, then you have ten minutes to get there” and then through your phone it knows where you are and thing like that so it can give you that feedback. CARL:**More or less. And since I don’t always take the same train, but I would take the train from the same station and I know what the schedule of the trains are. I usually take one of two different paths on my bike to get there, depending on whether I want to avoid a particular school that gets really busy at a certain time or not when all the kids get dropped off. If it knows which path I’m on and it knows the last two weeks of me riding this path, it can tell me whether I’m on pace or not via the phone’s GPS. It knows when the next train is, and so it ought to be able to give me some kind of a quick display that says “Your pace is too slow,” “Your pace is fine and you’ve got an extra minute, don’t worry about it” – that kind of stuff. So that’s what I’m investigating. Whether or not this will end up being something that will be useful for other people, I don’t know. Largely, it’s going to depend on how much of a pain it’s going to be to get access to the data for the ride and to get access to the data for the train schedules and that kind of stuff. Because I don’t have anybody – or many people are going to be willing to type in “Here’s the time that the trains leave at the station that I go to” and I don’t know that I want to get to the point where I’m trying to access the train schedules for a whole bunch of different metropolitan areas. It might end up being just for me, or it might end up being for everybody, and it might be the kind of thing that some other app already solves and so by the time the watch comes out, somebody’s already scratched some itch. I’ve learned some stuff by trying to build that app, but [inaudible] myself.**CHUCK: Yeah, that makes sense. I remember looking into something similar for the transit system here in the Northern Utah area and I did find that UTA, which is our transit folks, they don’t publish an API but you can download the bus schedules on a pdf. And they’re all tabular, so if you could take it apart, you could parse it out. But it seemed like a whole lot more work than I really wanted to do; I just wanted to go, “What’s the schedule for this train” and have it give me a JSON object back. PETE: Does your public transit show up on Google Maps today? CHUCK: Yes. PETE:**That means that they are exposing an API to Google and it’s an open source API. I’ll have to remember what the name is and pick it. I’ve dug into this a bunch because I am obsessed with building transit apps [crosstalk].**CHUCK: Oh that’s right, you’ve built the BART app for OSX. PETE:**Four or five times now [chuckling]. And yeah, they have this really kooky API, but it’s very well-defined and almost all the transit agencies that implement it, they do expose it publicly because they have to expose it to Google anyway. Most of the time, there is a real-time – it’s called the real-time transit protocol or something like that.**CHUCK: Very nice. PETE: I think a good rule of thumb is if your transit information shows up in Google Maps, then it should be accessible. If it’s not, then you can probably ask them to expose it. CARL:One thing that I’m thinking about playing with that I haven’t really dug into yet is to what extent I can get access to the navigation information from Google apps in my own app – whether that’s an app that actually has a map in it, or whether I can just ask Google that question then use that to push to the watch and that kind of stuff. Because ideally, I don’t really care about any of that. My value add for this particular app is basically how close [inaudible] to being on time, to being able to make the train. It’s particularly annoying here in Austin because the trains only run every half an hour, unlike when I’m in New York or something and if I miss one, in five or eight minutes, I can get another one. If they only ran every half an hour and you miss one, that’s a lot of really annoying downtimes, so it really behooves me to make sure that I’m at the platform okay. I don’t really want to write a full-blown transit app; I just want to write a “you’re on pace or not,” in a very easy way for me to see while I’m on my bike. And I think that’s a perfect kind of use case for an Apple Watch or a product like that.ANDREW: Yeah, well you could actually hit the Google. I think Google Maps, you can actually tell it to plot your course from where you are to the train station, and so you could make an API query there, and it’ll tell you how long it’ll take you to walk there. Of course, it’s kind of an average pace for an average person, but then I could track it and say “You only have two minutes and Google thinks it’s going to take you five.” CARL: Right. CHUCK: Anyway, really interesting. You guys have any other questions about WatchKit before we get to the picks? JAIM: I wanted to talk a little bit about actually building an app itself. The watch will be a new target for the app that you already have? CARL: There are actually more than one target. There’s a target for the watch itself, the watch app, the thing that we think shows up on the watch home screen. There’s a different target for the watch notification, and a third target for the watch glance. And by target here – for those that aren’t familiar with what we’re talking about – inside Xcode, there’s File>New>Target. And so there are three new targets that are associated with most Apple Watch apps. JAIM: Okay, and these are all required if you want to create an app for your watch? CARL: I think you can have just one of the three, although I’m not exactly sure why –. I’m sure there are circumstances under which you’d only want to take advantage of one of these, but if you wanted to take full advantage of what you can do with a watch, then you’ll end up having all three of the targets required. JAIM: Okay, that makes sense. I downloaded the Lister app, like many people did, and realized I couldn’t just hit “build” and make it grow, which everyone figured out. You had to do a lot of clicking around and I used some capabilities. I had to turn on iCloud and the app groups, things like that. Are those required to get the notifications working? CARL: No. If you look at – there’s an app called WatchKit Catalog, which is another Apple sample app, and it doesn’t have any of those fancy gyrations, and that’s actually really cool. It’s basically every user interface elements that you can possibly put on the watch in one app so you can play with them all. There’s a similar app called UICatalog that they built for iOS that's been around since at least 2009 or so. But the reason that the Lister app is so complicated is because it shares data between a Mac app, an iPhone app and a watch app. The reason that you can’t just build and run it is because it’s got to set up these application groups to allow the different apps on the different platforms to be able to get access to the same data – iCloud, not iCloud user defaults, that kind of stuff – so that the to-do list thing that you put on your Mac can end up showing up on your watch, or at least in the watch simulator. The whole sharing data between the different apps is complicated, but that’s what requires the application groups and having you to change all of your app bundle ids and all that kind of stuff in order to get the Lister app to run it all. JAIM: Okay, that makes sense. You’d set up your application groups like you would if you’re sharing apps between – if I was in different apps, or say, like a today widget or something like that. Same type of concepts. Alright. CARL: Right. Yeah, it’s the same kind of thing. If you’re wanting to play with an app and you want to play with the sample app, and you don’t want to waste a lot of time trying to figure out what’s going on, start with the WatchKit sample that Apple put out. It’s a lot simpler to deal with, and if you’re just looking at “what can I do with this app,’ it’s a lot easier to deal with as well. JAIM: Very cool. CHUCK: Alright, let’s do us some picks. Jaim, do you want to start us with picks? JAIM:Okay, sure. I’m just going to have one pick today. I’ve got a complicated relationship with NHL. I love hockey – we like hockey up here – and a few years ago, they went on strike, I got mad, and then I got rid of the cable and I stopped watching hockey because it was not on TV. There are no games in free TV anymore; that’s how it works. I still don’t have cable, but I noticed that NHL GameCenter went on sale like a hundred buck earlier in the season, so I signed up, and very good. A couple of years ago, I tried it out; it was pretty [inaudible] and Xbox and the iPhone stuff. Pretty bad, but the NHL GameCenter right now is doing pretty good. The streaming is not perfect, but pretty good. You can definitely watch, keep tabs on things, so I’ve been watching a lot of hockey. NHL GameCenter – I’m [inaudible]. So if you like hockey, I can watch any game I want, any day. All hockey, all the time. That’s my pick.CHUCK: Awesome. Andrew, what are your picks? ANDREW: I’ve got two picks today. My first pick is a new open source tool called Carthage. This was written by Justin Spahr-Summers who works at GitHub and is also one of the people that originally wrote Reactive Cocoa. Carthage is a dependency manager for iOS and Mac, so it’s something like Cocoa Pods. Where it differs from Cocoa Pods is that Cocoa Pods downloads source and then creates sub-projects and puts those all in workspace, and then when you have to use that workspace and when you make updates, it actually can change your project. Anyway, Carthage takes a different approach. It uses frameworks, so you don’t have to have it modified or use their workspace. In fact, it doesn’t even modify your projects at all. All it really knows how to do is download code from a GitHub repository and build a framework, so this does rely on iOS 8’s new support for dynamic frameworks, but it works on the Mac too, which just had that support for a long time. It just goes along with my thinking more than Cocoa Pods, which sometimes annoys me, so I’m kind of excited to try this out and to use it, and I’m also working on making a couple of my open source projects work with Carthage – that’s pick number one. Pick number two is Powerpig, also known as Chris McVeigh. I guess you should call him an artist, but the thing that I’m really picking is his Lego designs. He’s got a bunch of Lego designs that he has made and he actually sells most of them as kits. I got one of these recently that’s a model of the original Mac, and I just think he does a really good job. He’s got a lot of cool technology stuff, but it’s like retro computers and old TVs and old video game consoles all built out of Lego, so it’s pretty cool stuff. He also does t-shirts and cards and iPhone cases and all kinds of things like that. It’s Powerpig. And those are my picks! CHUCK: Nice! Pete, what are your picks? PETE: My first pick is this project called OpenWRT. This is an open source firmware for your router. It turns out, most of those wireless routers that you have in your home today are actually running a little Linux distribution and you can flash them with a new Linux distribution. OpenWRT is a way to give your router geeky superpowers so you can basically flash it with this new “firmware” and it turns out the firmware is a Linux distro and you can SSH on to it and you can install all sorts of crazy, geeky Linux things, or you can just get a better UI in the webUI for administering your router. It’s really cool; I’ve used it for years and years, and then I just recently got a new router and I reinstalled it, and it’s way nicer now. If you want to spend the weekend messing around with your router, then OpenWRT is a good place to start. And then since we were mentioning this transit feed stuff, I’m going to pick Google’s General Transit Feed Specification. There’ll be a link in the show notes with more details about that. I’ll include links for a couple of lists of public feeds so you can go on these sites – you’d go in these pages and see “Does Austin, Texas have a public feed?” and indeed it does, as does Briarwood County, Florida and Tillamook County, Oregon. So that’s good to know. It’s a really wacky specification, especially the real-time stuff is super optimized for Google’s consumption, so it’s very, very hard to understand how to consume it, but that's another fun weekend you could spend, trying to figure that out. And then my last pick is a beer. I’m going to pick Firestone Opal. This is a farmhouse ale, so it’s Saison, if you’re into those kind of beers from Firestone, which is in California. In Paso Robles, I think. It’s a really good, very affordable Saison. It’s got lots of lime and almost sour-bitter going on and very refreshing. Just the thing to refresh yourself in a cold winter’s day. I don’t think that works, but never mind. There you go. Those are my picks. CHUCK: Very nice. I’ve got a couple of picks that I’d like to share. The first one is called Kanban Flow and it’s basically a Kanban board. It’s like Trello except prettier. I started using it in a way that’s not exactly for software development Kanban stuff. I’m going to point you to a video by John Sonmez where he actually explains how he plans out his week and gets stuff done. I’ve started doing something similar – not exactly the same, but similar – and it’s been really nice for me to be able to just get stuff done and track what I need to do and plan out my week. Those are my picks. Carl, what are your picks? CARL: I’ve got three. First off, there's a site called Keynotopia.com, and it’s a place where they have templates for iPhone apps – and now Apple Watch apps – so you can prototype user interfaces. I’ve used it for a long time and it’s really cool. In a world where we’re trying to figure out what we can do with Apple Watch apps, it’s kind of cool to have a prototyping tool for you to play with. Second pick is an app called Cyclemeter by a company called Abvio – A-B-V-I-O. It’s the app that I use that tracks my rides when I’m running back and forth to the train station. It actually talks to me via my Bluetooth headset and tells me how long I’ve been riding and what time it is and that kind of stuff, so it’s a good example of the kind of things that you can do with an app when you’re not having somebody able to actually look at their phone. It’s good to get people thinking about what might be good for doing Apple Watch stuff. My third pick isn’t Apple Watch related. There’s a book – the Pro Git book by Scott Chacon from GitHub. Just released a second edition in the last week or two, and it’s always been my favorite. Since it came out, it’s been my favorite book on git, the source control, and it’s got a new chapter that’s cool on embedding git inside your app – whatever kind of app that is. So if you’re into git or find it might be useful for you to use in an app as a store or a value store, or a way to roll back and do/undo and that kind of stuff, it’s a really good book for that. Those are my picks. CHUCK: Very nice! Alright, well I don’t think we have any announcements or anything, so I’m just going to thank you for coming and we’ll catch everyone next week!  [This episode is sponsored by MadGlory. You've been building software for a long time and sometimes it gets a little overwhelming. Work piles up, hiring sucks and it's hard to get projects out the door. Check out MadGlory. They're a small shop with experience shipping big products. They're smart, dedicated, will augment your team and work as hard as you do. Find them online at MadGlory.com or on Twitter @MadGlory.]**[Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]**[Bandwidth for this segment is provided by CacheFly, the world’s fastest CDN. Deliver your content fast with CacheFly. Visit cachefly.com to learn more]**[Would you like to join a conversation with the iPhreaks and their guests? Want to support the show? We have a forum that allows you to join the conversation and support the show at the same time. You can sign up at iphreaksshow.com/forum]

Sign up for the Newsletter

Join our newsletter and get updates in your inbox. We won’t spam you and we respect your privacy.