[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 a 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 $1,000 signing bonus as a thank you for using them. But if you use the iPhreaks link, you’ll get a $2,000 bonus instead. 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]
CHUCK:
Hey everybody and welcome to episode 146 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 Minneapolis.
CHUCK:
I’m Charles Max Wood from DevChat.tv. This week we have a 2 special guests, we have Heiko Behrens? I hope I said that right.
HEIKO:
That’s correct. Hi.
CHUCK:
And we have Daniel— I didn’t catch your last name, Daniel.
DANIEL:
Rodriguez. Hi from Plato City.
CHUCK:
Before we have you introduced yourselves, we do have a quick announcement and that is that the iPhreaks are going to the Build Conference in San Francisco! Keep an eye on the mailing list. I’ll also try and tweet out some stuff on the iPhreaks account, letting you know how to come hang out with us. The JavaScript Jabber podcast is going as well. So we’ll try and have some kind of get together so if people want to come and meet up with us then you can. But let’s go ahead and talk about our topic here. Heiko and Daniel, do you want to introduce yourselves?
HEIKO:
Sure. So I’m Heiko. I’m with Pebble and over there, I’m wearing actual several hats. I think the one that resonates most with the core audience of this podcast is that I’m leading the team that at Apple would be UI Kit. So I’m APIs and everything that is huge or interface related but as I said, I do several other things a well and my team now transitioned to something that is super exciting. Maybe for another podcast and that is I’m bringing JavaScript to run directly on our verbal devices which is super awesome. Maybe we can talk about that briefly at the end of the show.
CHUCK:
Whoa! Yeah. I have a JavaScript podcast. Let’s definitely talk about that after the show.
DANIEL:
As myself, I’m Daniel. I’m one of the iOS engineers in the company. Not that many hats as Heiko but I like to touch a lot of things. We are basically in charge of the application, the Pebble STK, the foreign parts of the iOS ecosystem—are on the company.
CHUCK:
Awesome! So we did bring you on to talk about the Pebble.
HEIKO:
Umhum.
CHUCK:
Since my cameras on, I’ll show you, I’m wearing a Pebble Time Steel.
HEIKO:
Nice.
CHUCK:
[Chuckles] Yeah. So I’m a fan. I know some of the other panelists here have Apple watches. Do you want to outline what the differences are just as far as the device goes and what it’s capable of between the Pebble and the Apple watch to get people a point of reference?
HEIKO:
Sure thing. So I like to think of Pebble as one of the first mover in the market when everybody else was saying that there is no such thing as a smart watch. Pebble shifted years ago. From day one, it was very hackable, very appealing to developers that could implement applications and watch base as running directly on the watch. As an independent application, they had access and still have through the screen. They can literally alter every single pixel and access all the sensors. Then, later we add the ability to also talk to your phone. So it’s not meant as a second screen to your phone or a companion to your existing iOS app. But the watch can live independently from the phone the very last for I don’t know, yours maybe for at least a week, I would say, maybe longer.
CHUCK:
Yeah, about a week— ten days.
HEIKO:
That’s nice. Yeah. So that’s basically the core differentiator I would say. It is mend as an independent device that has its own use case. But sure thing you can extend your existing iOS application and many popular app store that to broaden the use case and to also take advantage of something that’s always on the risk. Unlike the Apple watch. It’s waterproof although we are a bit more hesitant on our marketing material. We say water-resistant but actually the original one was water proof up to 50 meters, I think. You can go for swim with it. It is, as I said, it can work without your phone and it’s the display that’s one of the most differentiators. The display’s always on. It uses e-paper and therefore it is more readable, the brighter it is outdoor-ish, for example, is ideal for watch.
CHUCK:
Yeah. The thing that’s nice about it for me as far as at night is that I can shake my wrist. I have this maneuver that I do with my arm [chuckles] to get it to come on at night. But it’s nice cause it’s on for a second. I can cover it with my hand or something if I don’t want to bug my wife and then it turns back off. The back lighting anyway but yeah, if I’m out doing something, I can just look at it. I don’t have to have the back lighting and I think, that makes a big difference for the battery life. I
think that would probably be my biggest issue with an Apple watch, if I had one, would just be the battery life in general because it seems like that’s a screen just like on my iPhone and that probably sucks down a whole bunch of more power.
HEIKO:
So I personally do have an Apple watch and here at the company we look at literally every variable that comes out. We have a huge shelf of all the different gadgets. What I really like about the Apple watch, and people often compare us to obviously, is the seem less integration with your iOS devices. So there are just a few things we cannot do and I would love to talk about that and Daniel can tell a lot of stories—.
DANIEL:
Oh, yes I can [crosstalk].
HEIKO:
— [chuckles] about problems when you want to be a good citizen in the iOS ecosystem. Also the Apple watch in perfect condition has a gorgeous display. So I said that before, yes, we have epaper. That’s not e ink so don’t get me wrong. It’s not a Kindle display where you’re only— where you have to wait half a second until you see your screen. In fact we can run it 30 fps but it is a bit washed out, it is not high density so it’s far from being Retina. It is really low resolution which is good enough for many use cases but you will definitely— if you put them next to each other— the Apple watch just looks gorgeous, just from industrial design perspective with the display and to finish in all of that. But at the same time, you can purchase a classic four— what is it, 70 dollars?
DANIEL:
Yes, less than a hundred.
HEIKO:
Yeah. So, of course. We see us the more hackable and affordable smart watch in the market.
DANIEL:
Let’s just say that we are from the Wozniak of the Steve’s, not the [inaudible]. [Chuckles]
HEIKO:
Yeah, I like that.
CHUCK:
So this is a show for developers, not necessarily for consumers. So I’m curious what is the development experience on the Pebble? Then, related to that is how is the experience on the Pebble when you’re building an app that spans from the watch to the phone or the phone to the watch?
DANIEL:
In Pebble, you have several options. You can choose to go close to the middle and develop your watch application or your watch face in pure C. We have a very modern C API. It doesn’t feel like your grandfather C. You can do mostly whatever you want. Everything runs in the watch. You are obviously limited in the quantity of RAM and quantity of CPU that you are going to get but everything else is, you are free to do mostly whatever with the APSL that we provide. Obviously, that leaves your application running only on the watch. So there is parts that can run inside our phones, inside our mobile applications. These parts are normally down in JavaScript because allows you to basically write once the code and we run the same JavaScript in the Android application and the iOS application.
You have another option which is coding your own third party app, communicating with the watch directly instead of going through our application which gives you a lot more freedom of what you can do. But obviously involves deploying iOS and an Android application to support your application. So normally apps in the— in our app store goes through basically the combo watch app written in C and JavaScript extensions running on the mobile’s application.
HEIKO:
Maybe it makes sense to show that with an example. So there is— there was – there still is an iOS application called Where To. It is an iOS app you can purchase from the app store and it is basically listing points of interest. The purpose of that iOS application iOS application always was to guide you through that point of interest. Say, a rest on a gas station or something.
What the developer did is they extended the use case to the Pebble. Then they had to write that in C— yes, as Daniel said —and it runs on the watch. But without the phone, it’s more or less useless because it needs to know where to guide to. So, Where To transmits the distance and the direction like North or South to the watch. And because Pebble has a compass and because Pebble has an accelerometer and you have direct access to the screen, what they did is they implemented an arrow that always points to the point of interest on your Pebble screen. So you will basically use it as some magic RAM that always shows you the arrow, “Oh this is where I need to go to. It is 200 feet in that direction.” As you move, the iOS app knows that you change your location and while the iOS app would also tell you, it is like 100 feet in that direction. You can leave the phone in the pocket and all the app does, it continues to talk to the Pebble app and tells that, “It’s now only 100 feet and it’s not North but it’s now a North East.” As the watch receives that point of data, it can accommodate, forward and continues to read the compass that’s built in to the watch to update that arrow.
So here you can see that it is more or less unlike a WatchOS 1 2 app. So it’s not like WatchOS 1 where you Remote Control everything from within your phone’s application. These things really act independently but the phone can and your existing app can provide useful information to enhance the experience on the watch. Does that make sense?
JAIM:
Yes. I’m curious what accelerometer functions are available on the Pebble and to access that— do you access it with the JavaScript or only the C?
HEIKO:
So JavaScript here is a bit different. The JavaScript Daniel was mentioning is basically running on the phone. So just to put this in perspective, we are not talking about the device here that has gigabytes of storage and hundreds of megabytes of RAM; we are talking about a device where your application including code is 64 kilobytes. So just to— that is about the size of an iPad icon if you’re really come to pixels and multiply by four bytes, that’s about it. You really have to write concise code here and that is running on the watch in C and on that level you can totally access the accelerometer and get readings at 100 yards on all three dimensions. The same is true for compass and all that but in JavaScript that’s running on the phone where you don’t have access to these centers that are on the watch.
CHUCK:
So my question is then, so JavaScript runs on the phone then not on the watch?
DANIEL:
Right now, JavaScript only runs on the phones. Basically, it allows you to add a lot of extra capabilities that the watch will not have like being able to parse JSON, being able to connect to the network, getting job location. The watch doesn’t have a GPS itself so, we fall back to the GPS on the— on your mobile phone, lot of other capabilities that the watch simply cannot do. So it’s like the big brother of the watch doing a lot of work for what Heiko has mentioned before; we are trying to move into this idea that you are going to run the JavaScript in the watch. You are going to write one JavaScript and that’s going to be basically running in the watch or in the phone. You are not going to know these, where it’s going to run because you basically don’t care like the pass that can be run in the watch will run in the watch. The pass that cannot be run in the watch, for example, using a Wi-Fi or a 3G network will run in the phone.
CHUCK:
And are you doing that through JavaScriptCore?
HEIKO:
So you mean the phone part? [Crosstalk] That’s JavaScriptCore.
CHUCK:
Yeah.
DANIEL:
Oh, yes. Of— Sorry. Yeah this is two different JavaScript engines running here. In Ios, we use JavaScriptCore. In Android, it’s a— .
CHUCK:
It’s VM, I think [crosstalk].
DANIEL:
—Don’t quote me in this. I don’t know if it’s Rhino or V8. I think, it’s probably Rhino but—.
HEIKO:
It was Rhino [crosstalk]. I’m not sure if it’s anymore—.
DANIEL:
Okay [crosstalk].
HEIKO:
—we’ve wanted to transition to V8 one— at one point.
DANIEL:
Yeah. I’m not sure in which point we are. In the watch, it’s—.
HEIKO:
So do you mind talking about that for a minute [crosstalk]? Because—.
CHUCK:
Yeah. Go ahead [crosstalk].
HEIKO:
—I would love to. So right now, we have a model that you can write pure JavaScript applications already. If you think about it, you could— as you can run JavaScript on the phone, you could have just a super tiny shell or C app, a generic one that receives Remote Commands and if you’re asked that Remote thing to render a button or to render and label, you can also ask it to update that label. You end up basically with architecture that’s similar to WatchOS 1 where the phone Remotes Control every single interaction on the watch. If you act on a button on a watch, you would recei— we would transmit that via Bluetooth to the JavaScript that’s running in the phone and that you’re having an event [inaudible], you can act on it by saying, “Update that label please.” Then you go back to Bluetooth and update that on the watch. You could totally build it and in fact rebuild it. That is what’s called Pebble.js.
So it is— the experience is a JavaScript developer can build this but there’s lot of latency involved. That’s basically similar to WatchOS 1. Also, you always need to be connected to the phone because the logic is running on the phone. So what we transitioned to right now is, we have several JavaScript engines that are small enough to run on our tiny hardware. Again we’re talking kilobytes here. Right now, we are— we actually have a firmware running that has JavaScript directly on the watch with REP APIs so that you are— you can use your existing knowledge when you talk to say, the accelerometer, you use the motion events that are known through REP APIs. Even our drawing routines that are very specific for watch faces today are surfaced through the canvas contacts to the APIs so you really can leverage your existing JavaScript knowledge.
JAIM:
So Heiko [crosstalk]—
HEIKO:
Yup [crosstalk]?
JAIM:
—for the iOS developers—.
HEIKO:
Yeah [crosstalk].
JAIM:
— what API in JavaScript speak?
HEIKO:
So that is more or less standardized way that today is mostly surfaced through browsers. So there’s a whole bunch of APIs— you would usually know as a JavaScript developer when you have a background in front end development in browsers.
So today’s browsers, even Safari or WebKit, webviews give you access to those. That includes say, motion events or device orientation or if you have a canvass element, how to draw on that element and that is standardized across the board between the different browser of banders including WebKit. So that you can write your code once and it runs everywhere and that browser-y environment.
Whereas Node, for example, has for many things different approaches and that’s just another set up API. Yes, it’s still JavaScript but in different level of API. So you would need to relearn that. And our approach – even, although we are talking about a very limited embedded device, our goal is to service the same REP APIs that makes sense in our context. You would be surprised, how broad the spectrum of web API is. So there is Bluetooth LE, there’s MB and [inaudible], there’s vibration and all that is standardized through the W3C. So yeah, think of it as the Cocoa touch but for web.
JAIM:
So if you’re developing your Pebble app, you can get the ambient light? Or do things that you wouldn’t less expect to from JavaScript but you’re able to in your Pebble app. You’re right. So that’s available from the device.
HEIKO:
So don’t get me wrong. What this whole JavaScript on the watch is future talk. Yes we are working on this but all the capabilities like your access to compass, your access to the accelerometer, your access to buttons, you can manipulate every single pixel on the screen is already accessible to third party developers and was for the last years. But that is still through C. So it’s not the most prominent language today.
JAIM:
Okay, very cool. I was going to get to the part where we talk about the— these features you can access from the C library but use whenever that so okay. That’s cool stuff [crosstalk].
ANDREW:
I backed the first Pebble on Kickstarter so I’ve had one since they first shipped it. And when I first got it, as an iOS developer, I was a little bit surprised and impressed just at the things you were able to do. In particular, I didn’t realize until that point that it would even be possible to build a device that could get notifications that came through the phone. They weren’t notifications from the Pebble app. They were just any notification that was a push notification on the phone showed up on the watch. That makes me wonder— I just like to know a little bit about some of the things like that that you are able to do with the built in and public stuff on iOS when you build an accessory like— well I don’t want to call an accessory – when you build a device like Pebble.
DANIEL:
So a little bit of history. When the Pebble actually shipped, that was iOS 6. So in that case, we didn’t have their right APIs. So we could only do notifications for mail because we were basically do in two things. For SMS, we were imitating being in a car system that they also receive their SMS through one of the Bluetooth classic protocols. Also, we were basically checking your mail from the application because you’d be [inaudible] access inside the app. That will check every hour of whatever and send your mail notifications internally to the watch. That was obviously limited and you will not be able to get Facebook notifications or whatever; however, to our surprise, during the WWDC of iOS 7, Apple published their documentation and there was this thing that is very little known which is called ANCS— Apple Notification Center Service which is a Bluetooth release service that every iPhone with early capabilities and every iPad with early capabilities, support. That basically published every notification that arrives to your notification center to any LE device that is interested in them.
When we shipped the first Pebble watch, we were intelligent enough to actually include the Bluetooth elite chip and that allows us to basically pair with LE to their wat— to their phone and use those kinds of services that Apple expose, for some reason, in iOS 7 because it’s not a typical Apple service. That is the service that we keep using until iOS 9. So today, for getting your notifications into your watch, that’s basically it. It’s very little known. There is some applications, for example, there is an application called Notifier, various trans [inaudible] written. We’ll probably leave their link in the show notes which is basically the same but for your Mac. So you have it installed in your Mac and every notification that comes through to your iPhone, it appears in your desktop. So it’s very nice to not having to look at your phone. It just simply appears in your desktop.
JAIM:
So if I’m hacking around on a Bluetooth device, do I have access to the same choices you do? Do you get to do anything with Apple to get at this data?
DANIEL:
No. Bluetooth LE for Apple is quite open. The only thing using LE unit to was then a little bit for permission is that you cannot use the [inaudible] brand name for free. You have to go through their branding process but it’s just a branding process like I want to use it. I want to use it in this context and they tell you, “Okay. But you cannot do it this way or you cannot use this other way.” But the rest of LE is completely for free.
Every LE service release by the iPhone is completely open as long as you pair your device and the user accepts the pairing of your device with a phone. There is a couple of other services that they published like there is one called AMS— Apple Music Service which is basically to control the music like volume up, volume down, which track is playing, play, pause, forward, backwards. I don’t remember exactly but they have a lot of these small services for LE devices. We basically use many of them to power our watch.
ANDREW:
When you get in the notification on the Pebble, can you react to it? So on the Apple watch, you usually have options and some things like if you got a text, you can respond with text. Is that possible on Pebble?
HEIKO:
So when Daniel was describing that, it almost sound too good to be true. You have access to all of that. To be perfectly clear here, ANCS really is the band minimum of what Daniel was describing. So there’s no structured information. If you send yourself a remote notification or by schedule a local notification on iOS, you have the ability to structure that and actually attach some information to it. What we received for ANCS is nothing but the bundle ID so whatever you submitted your application with, the tittle of the application and some long string.
Apple recently introduced the ability to what it is a one in a half of data. You can put all stuff, all kinds of different information in it. We have no access to that, whatsoever. There are no images, nothing we have access to through ANCS. Also, so that for example makes it really hard to know, oh a friend on Facebook wants to be— there’s a friend request. We have no idea which friend it really was. So we could parse the text potentially. But then our product is also localized and that makes it really flaky. Also, if you think about it, everything— we don’t have access to that from our phones so even simple— well, presumably, simple use cases such as notification filtering which we recently introduced really require us to receive a notification on the watch where we have the bundle ID.
Notification filtering, we do just things. I don’t want to have Facebook notifications but email notifications. Let’s say, how do I know that the user doesn’t want to have Facebook when the user configures that in our mobile phones app? Well, the mobile phone cannot intercept that communication level. So what do we do here? We received the notification on the watch. Then, well that’s not entirely true but what we need to do is we pass that information back through our communication channel to our phones app where the phone app for the first time use about that application because— since iOS 9, Apple prevented us to scan for applications through URL schemes. We cannot really see if the user has Facebook at all so we need to collect all the applications you ever received notifications from but only the watch can do that. Then the user configures it. We need to transfer it back to the watch in order to filter over there.
So the common pattern we have here is that we have always for every single use case, some APIs that’s somewhat to what we are aiming for but they are never to the degree where they are fully useful to our use cases.
Now, your question was, can we reply to notifications? Can we interact with those? Since iOS 8, Apple introduced actionable notifications so you can have like on an email, you can say, “Delete that or archive that.” It’s surfaced on the notification center and people would assume that a notification center service gives access to this and it looks like it. If you look at the documentation, yes there is a way but Apple never implemented it. Well, for some things that it’s something but for example, at Facebook or any third party app, when they add actions, they don’t show up via ANCS. If you read closely, the documentation on ANCS mismatches. There’s no way that that API can ever reflect what a third party developer does anyway. It almost looks like these two teams came up with something that doesn’t match.
he team that it responsible for implementing it, the ANCS team never got around and implemented it anyway. So for more than a year, actually one and a half years now, we have this API called document there and it does nothing. Yes, of course we talked to Apple but we have—we know— .
JAIM:
They told you to spit of radar [crosstalk]?
[Laughs]
DANIEL:
We have several radars.
HEIKO:
Oh yes.
DANIEL:
I can tell you how many bytes of ten years, they have [inaudible] with their radars in the ANCS service which is actually four bytes of [inaudible].
ANDREW:
Wow [chuckles].
JAIM:
The place where [crosstalk] go to die.
DANIEL:
Three bytes and one bit.
HEIKO:
Also, we are not super here. We reverse engineer things. We hack things. So we try to make that first working and [inaudible] APIs and everything. But in the end, we want to ship a consumer product and there are just so many boundaries. So we actually recently introduced that right. So we apply to text messages. So how does that work?
DANIEL:
Yeah. Like—so for iOS 9, you can provide an action in the notification that is like a text reply. You can basically pull down and then write your text reply there. If you’re keyboard doesn’t disappear, you can send a text reply. So that part is not accessible for an ANCS at all like not when [inaudible] the documentation implies that. So after waiting a little bit and looking at our options we decide, well we will do it ourselves slowly but steadily. We are introducing text replies to SMS. We have now text replies for AT&T and other carriers are coming.
We are thinking in all our services like email but basically what our users need to do is give us the authentication for using their SMS through AT&T servers or any other carrier servers. So it puts a little bit of configuration pattern into the user. But we think it’s worth it because answering very fast from your [inaudible] is something that people actually love. Makes sense so we have to go and do this system of talking with AT&T servers and since like that— just because we don’t have access to all the APIs that Apple Watch use internally and we’ll we sow much of experience but we don’t have access to that.
HEIKO:
So let me just write the information flow here. You received a notification on to your, say an iMessage or a text message on to your iPhone. It appears on your notification center on the lock screen. ANCS tells us, “Here is something. It came to the system app iMessage so we know, “Okay. It’s potentially an SMS and here’s the text.” So we parse that and find the caller ID. Then, we use the carrier’s Web API to send back a text message. So on the watch you dictate, “Text” but there’s no iOS way to somehow pass that text to something on ANCS. So what we do is we have that text, yes, they use, “I wanted to reply,” and we hand it over to the carrier API AT&T and they send a true like a 20th century or 19— 21th century text message to their caller ID this iMessage originated from. You could extend that system in general towards every third party service including— I don’t know —What’s App or Facebook but it would always require us to basically work around the – hence; we got through ANCS.
DANIEL:
It’s actually— you put it easy because you say that we get the caller ID. But we don’t get the caller ID. We get mum or sounds it like that. We actually have to second the other school for contacts that matches mum. Ask you which one of the phones will be mum because you can probably have several for phones for your mother and send that so something that will be very easy like, “Hey reply this text. Please operating the system. Use this reply feature and send this text,” becomes very complicated. We have to ask the user to give us access to their AT&T user account to send those things in their name. We have to ask them for access to their address book. A lot of things will that when it was basically just there in the operating system.
That is something that is actually quite challenging and fun to find out this kind of solutions. We have many crazy ideas that are left on the side because they are very crazy. Not completely possible or something like that. But some of them, we think our users deserve having that— those capabilities.
JAIM:
Yeah. It’s cool to hear how you’re solving all these problems. Partially documented APIs and stuff like that. I want to ask a little bit about the developer experience. So if I have an iOS app and I would integrate with a Pebble, do I have to write an app for it? Or can I— how else can I do it?
HEIKO:
That depends on their kind of application you want to implement. For example, if you are just a music app say, a podcast app, you already play well with the iOS ecosystem and as Daniel said, this is standardized API there. So if the Pebble detects that you can be listening to a podcast, music that includes Spotify and other music services, Pebble itself would just be able to Remote Control you. So—
CHUCK:
I like that by the way [crosstalk]. I like when I go running and stuff, just being able to control it from my watch instead of having to find the button on my headphones or anything else. It’s really convenient.
HEIKO:
That’s my cue then here for running apps and sports apps in general. So there’s another class of applications, say Runkeeper for example have this already in iOS 6. Until today, when you do sports activities, there is a special set of APIs you can use to just transfer your current lab for your phase, speed, time and all that for your sports activity. So for that you would include the Pebble Kit which is similar to the Watch Kit like the Pebble Kit into your iOS application. It’s conveniently reachable through CocoaPods or how do you pronounce that? Kethar?
DANIEL:
Kethar. [Crosstalk]
CHUCK:
Carthage.
HEIKO:
Sorry, we’re both obviously from Europe. So that’s— you just include that into your application and if you are a sports application, you basically just continuously update that status; so what’s the [inaudible]? What’s the speed? Are you still exercising or not? We surface that piece of information at a special place on Pebble.
Now, if you want to have the other use case say, Where To or Pandora has something that is pretty good, then you need to write an application that physically runs on Pebble and it’s totally up to you how you set up the communication channels. So we, of course, we have APIs for all of that. So you can basically send either structured information or just a stream of data but you are responsible to write both ends in order to achieve this whole user experience.
JAIM:
Now, is data set through Pebble Kit or we go in straight to Bluetooth?
HEIKO:
Well, Pebble Kit is basically a convenience wrapper around Bluetooth here. So our new watches work with BLE. So if you’re used – and for all the listeners I encourage heavily to update your Pebble Kit 3.0 because it allows you to use the new BLE APIs and that allows you to also communicate through the Pebble in the background, multiple applications can talk to Pebble. Also the transmission ride is way faster. Then it’s basically on top of core Bluetooth.
JAIM:
Wow! Very cool.
ANDREW:
I’m wondering. You have the original Pebble and most Pebbles have a rectangular screen but you have a Pebble Time Round which has a round screen. This kind of interesting because it’s mean to shipping devices with screens with different shapes and I think that drives you a lot. So I wonder how you support that for developers. How can you make a Pebble App that works well on a round screen and a rectangular screen?
HEIKO:
Oh that’s a great question. When we were, of course that is exactly my domain. As I said, the UI Kit for Pebble, we struggled a long time to which extent we want to abstract the way the shape of the screen and everything. Do we want to have— and if you look then and do some research, there’s not a single decent standard to do any of this. So I was hoping.
So we were publishing the Pebble Time Round, the model you are mentioning after this year’s or last year’s WWDC. I was hoping so much for q round Apple watch because Apple has always great APIs very though through and everything. I was hoping for the answer for round UI and they didn’t ship it. So, that was a bummer and even the web then usually is a great place to look for diversity because they have to extract the way everything and it’s [inaudible]. But again, there is one proposal for CSS round and it doesn’t cover all the use cases we need so they don’t cover scrolling of text for example where you would need to reflow text as you scroll.
There are quite a few subtle challenges. What we have is basically not much so we have the ability to position, say, label somewhere on the screen and we can put it into a mode where we say, “Please flow the text according to the shape of the screen.” Even if— so you mentally, you still have a rectangular model, in that case square and you position your label somewhere on the screen. If you put the label into the mode that— it flows the text. It would not extend beyond the boundaries of the rectangular label but also not beyond the physical screen. That is for itself trivial. It becomes more complicated when you think about scrolling and also [inaudible].
So sometimes your— so first scrolling doesn’t really work if you move that up by five pixels, the whole text might reflow and you’ll have a hard time to read text as you’re scrolling. You cannot really continue to read as you scroll so we change the whole system to be paginationoriented. You basically go from page to page. But then if you do that, you might end up with [inaudible] so just one word on the new page. So we also prevent that and we do that all transparently.
So our UI system has basically two abstraction layers. Yes, we have something like a UI table view. That just automatically works because that’s trivial. We have some standardized system sales where they just act differently on the round display also. So that means that in the center of the screen is the selected element. That has more details and we just strip out some details and make it a bit more narrow when it comes to the top and low end of the screen.
This is all easy, but when you really want to have fine control on the screen, we equipped you with text flow capabilities that are way more convenient than anything I could see at Core Text, for example. Does that answer your question?
ANDREW:
Yeah. It does. But it does sound like, to some degree developers are going to have to do—
HEIKO:
The burden is onto the developer [crosstalk]
CHUCK:
Yes.
HEIKO:
We have actually tens of thousands of watch faces. Our developer ecosystem considering our size is flourishing. I really love it – to work with so dedicated developers.
One of our— most prominent uses case is to write watch faces. So custom things showing your family or showing just— we have stock right watch faces. We have whether watch faces or when Star Wars was on over Christmas, we had all the kind of theme this year. It’s great to see that but if they want to optimize for either rectangular or round, they need to consider it, to make the best use of every single pixel on the screen.
DANIEL:
It basically gives you the flexibility. If you use standard UI controls like say, our table view and many of the screens, you will not have to think about it. They are also— already thought for you like if you was for a string with an icon and a text, it’s already there and you don’t care if it’s rectangular or round. But if you need to, you can go to the lower level and with the update for the Pebble Time Round, all kind of new API for angles and circles and—.
HEIKO:
Yeah [crosstalk] so there’s literally a [crosstalk]—
DANIEL:
Caller coordinates appear that allows you to basically do what you need if UI that we provide is not enough for getting the visuals that you want for your watch app in the Pebble Time Round. So you can not care mostly to will work but you can care a lot. Then you can go into that pixel perfect mode and do the screens basically different for round and rectangular.
HEIKO:
So in an UI Kit [inaudible]— so you know functions such as [inaudible] graphics like CG rect and set and stuff. So think of it as give me a C rect and it give them angle and radius for giving size and make sure it’s doesn’t leave the screen. I want to have that rectangular so I can put my rectangle— my image of a size of so many pixels by so many pixels. It’s visible on the screen. So we have really [inaudible] working teams like that like that to make it easier but in the end you have to think through it. But we have emulators for all the different devices and you can easily iterate on those different screens that way without owning all the watches.
ANDREW:
Cool. So I— it’s interesting to hear the thought process has gone into this because I knew you would have thought deeply about it and work hard on it.
CHUCK:
So my question is, let’s say that I designed— I want to build an app for the Pebble. Where do I get started? Do I just go create a C program somewhere or are there instructions somewhere?
HEIKO:
Well yes, of course. We have a dedicated developer relations team that does run events, meet ups, and is also responsible for the developer face and documentation. If you go to developer.pebble.com, you can approach from different angles. In this case, there would be, “Oh, I have an iOS app; how do I start?” There are plenty of tutorials; there are many open source, GitHub examples. One of the benefits of being such an open, and hacking – hackable platform is that many of our developers open source their ideas. So you can learn also from the [inaudible] applications. Yeah, that’s basically it.
So if you— you would basically— we have an Android and also an iOS or a JavaScript example to start— actually multiple— to start with. I would actually copy from there. But it’s really as simple as including the CocoaPod to your project. Then you have this Pebble Watch Central thing and you ask for the watch that’s connected. Is it connected or not? I want to send messages to it. Yeah, that’s basically it.
We do have an app store. So an iOS developer, you could either ask like send, call our Pebble app that is basically the door to all the applications and user interactions on the phone. You could open that with our custom UI scheme and then pass the application or open the app store with your specific application. Alternatively, you could also or you should place your companion Pebble App in the Pebble App store so that existing users learn about your iOS app even without having it in the first place. So we the ability to – users have the ability to search for those apps that run on iOS only, then they will find your iOS app on through that channel as well. So it’s – to some degree, even another marketing channel.
ANDREW:
How did you get away with shipping an app that allows users to download other apps? Because I know there’s a prohibition on app stores on the app store. Although, a few slip through and shouldn’t have. How did you get around that?
DANIEL:
Well the first thing here is that the codes that we are downloading doesn’t run in the phone. So the rule say that you should not download and run codes in the phone which we simply avoid because the code is running the watch, okay? So that’s the first thing that we are basically on the side of the app store guidelines. So we don’t have a problem in that sense.
So now you may ask about the JavaScript that actually runs in the phone and the answer to that is that the guidelines say that you cannot download and run code step through Safari JavaScript Core and blah, blah, blah. There is a couple of exceptions. Well we use JavaScriptCore and that’s one of the reasons why JavaScript is there besides being multi-platform and very known by a lot of people so it’s convenient. It’s basically the language that we can use to download our code and execute it in the phone. But not that easy as it sounds because we have had a couple of attributes problems with that. So your code— the JavaScript code of every app in the app store ships inside the app— inside the iOS app to avoid download in the code.
HEIKO:
So let me get that right. Whenever we send an update through Apple to update our phone app, this app as a resource contains the entire app store of all JavaScript, of all Pebble Apps so that we technically never download the JavaScript portion of those Pebble apps which is ridiculous. But it is a political decision we make in order to not conflict with any guidelines to that [inaudible].
In other issue, they had was “Oh, app store? That sounds like selling things?” So until today although they never really explicitly said that so they— until today we shied away to implement a way to purchase apps. What happened instead is that third party developers came up with quite creative ways to ask Android users for money. So by now, I’m aware of two famous solutions around the Pebble ecosystem that allow third party developers to still make money with their apps. Of course, there’s always the obvious way to charge for the iOS app. But until today, we don’t have a paid app store build into our phone for app because that may or may not create some problems here.
As you can see, the relationship with Pebble is always a bit delicate and we try to because the worst thing that could happen is that they ban us from the app store and then the Pebble doesn’t work anymore.
DANIEL:
Yeah it’s a very love-hate situation with the app— the app store review team.
ANDREW:
You will need both. [Chuckles]
DANIEL:
Like [inaudible]. Yeah, it’s really a pity that we have to leave so those kinds of things to do really innovative things that will probably help the platform. Because I always thought there is people doing amazing things there. They are just crashing into our review process that is very hard to overcome in some senses and there will be amazing products if they were a little bit more open in— with our community.
ANDREW:
Yeah. We can only hope it changes for the better in the future.
DANIEL:
Yeah. Well, it can only go to better; it cannot be worse, right?
ANDREW:
I hope so. [Chuckles] Never say never.
CHUCK:
Alright. Any other questions or anything else we should talk about with the Pebble before we get to our picks?
HEIKO:
I would be— encourage developers to have another look at Pebble because you would be surprised on how many things are possible on Pebble that are, until today, not even thinkable on Apple watch. So you have access to all this sensors. You have— we have the ability to run background apps on the Pebble that always run in the background to, for example, gather accelerometer or compass data. We do that for health related research projects and considering how low and durable this hardware is, you can think of use cases such as sailing or outdoor activities. That’s really, to me, a great class when it comes to hackability of the platform.
DANIEL:
I was amazed that there is an IV app for the Pebble.
HEIKO:
Oh, so I personally wrote an app that streams video data to the Pebble. The Pebble itself can be submerged while doing so. So that’s not fully – so you cannot read diet with it so my dream was always to use a GoPro underwater and stream that into your Pebble and while people are using the compass app underwater, we have a fan boy photo where somebody was on a diving vacation like snorkeling? Is that the term?
CHUCK:
Snorkeling [crosstalk].
HEIKO:
And looking at the Pebble which— and took a photo. That’s amazing but considering that you always need to have the phone to transmit data and Bluetooth under water doesn’t really work well [chuckles]. There are, of course, limitations. But at one hackathon, somebody did an application for the ISS. I’m not sure anybody had the ISS ever had a Pebble but it was still interesting thought.
CHUCK:
Nice. So you’re telling me that my Pebble Time Steel, I can actually go swim with it?
HEIKO:
So here’s the problem. Our loyal team would totally kill me for it but I swim with it and I go into the sauna with it, there’s absolutely no problem. But warranty would probably not give you another unit. Although we are really open to— so I see many people that have problems with their watches that are three years old. For the same reason, we still updates software for our three year-old original Pebbles. We are also very open to exchange watches that don’t work anymore.
I saw somebody who had a water-leak. I don’t really sure what they did with it because you really need to crack it with a hammer. But we— I know that for a fact, he got a replacement. So I would give it a shot, maybe. But don’t quote me here.
CHUCK:
[Chuckles] So officially, no but friend to friend—
HEIKO:
I tried [crosstalk]. I do it all the time, yes.
CHUCK:
“I do it all the time.” Okay, got it.
DANIEL:
The Pebble Time Steel, it’s [inaudible] in other social [inaudible] that last year. We were using it in pools and everything all the time before it was shipped. It just you cannot put it in paper.
CHUCK:
Alright. Well, let’s go and get to some picks. Andrew do you want to start off the picks?
ANDREW:
Sure. I’ve got a co— well three picks today. My first pick is just a library that has been around for a while. It’s one of Matt Thomson’s libraries but it came up again yesterday for me. One thing that really— as a Mac developer, one thing that bugs me when I’m on iOS is that there’s no NSXML document. So parsing, doing just really simple parsing of XML is harder than I think it should be. Same goes for generating XML. So Matt wrote a little library called Ono that basically just duplicates the NSXML document API for iOS. It even means you to share code between iOS and Mac without a lot of trouble using NS doc— NSXML document. So that’s Ono.
My second pick is a new Mike Ash article. He did a post on his blog about Swift Asserts and as usual, was really thorough. Talked about how they implemented, how they can be used with the differences between the different kinds of Asserts that are in Swift are etc. So this is nice to read if you want to use Asserts in Swift. I think, they have a really good prominent place in Swift. There are a lot of good arguments for using them.
My last pick is— well, it’s a person and his company. I also happen to know he’s an iPhreaks listener but his name’s Anders Kierulf and he has a company called SmartGo and a bunch of apps for the game of Go. The reason I’m picking this is because in the news yesterday was that the Google’s Alpha Go— I think he’s the world champion, the best Go player in the world.
Go is a lot harder game to make a computer play than chess is. So this is a big thing in the world of Computer Science but it’s also a big thing in the world of Go and Anders has some really cool Go apps, both for learning and just playing Go on iOS. So those are my picks.
CHUCK:
Alright. Jaim, what are your picks?
JAIM:
Okay. I’ve got one pick. So here in the north land, we just got through with our State High School Hockey Tournament. Most places are scratched their head why we’d care about a High School Hockey Tournament. But here’s the big deal. It’s all on the TV is and everyone watches it but it’s not all about the hockey. Me and my friends who watch the hockey tune in just for the hockey hair.
Hockey air has been a big thing for certain subgroup for quite a while. Back in the 80’s, 90’s, the mullet was supreme. I think the mullet like Samson; keeps you young. You heard me [inaudible], if you grab that SEGA and played the NHL 94’, 95’ you could play [inaudible]. He’s still in the NHL. He’s still scoring goals. So a lot of people tune in for the High School – say talking or to check out the hair. The 2016 Minnesota State High School Hockey All Hair Team and they have a guest judge Barry Melrose, former NHL coach hockey analyst and the guy knows a little bit about great hockey hair.
Grown men talking about teenage boys’ hair might sound a little creepy and you’d have a point but I’m going to go with it. All proceeds go to help the Warriors Hockey which helps disabled veterans play hockey. So that might be the most Minnesotan phrase I’ve ever uttered. Anyway, check out the Minnesota State High School Hockey All Hair Team.
CHUCK:
Alright. I’m going to go ahead and throw a couple picks out there. The first one is a podcast rap. So if you’re a podcaster, it’s especially funny but it’s funny if you listen to podcast. It’s pretty awesome. It’s on Facebook so you probably have to be signed in to see it. Anyway, I really just laugh quite a bit at it. So that’s going to be my pick this week.
Heiko, do you have some picks for us?
HEIKO:
Yeah. I have three picks. My first one and I know it’s already been mentioned at that previous iPhreaks Show but it’s PaintCode by PixelCut. PaintCode is a tool that allows you to create code. It generates code that dynamically renders graphics. I often describe it as a mix between Excel and Sketch. So you use it as a visual tool but you can’t parameterize every formula’s so that’s just amazing.
Most people use it for buttons and everything. But because it’s also so close to Core Graphics, I often times use it as a playground where I can iterate on various edge cases. Just recently I used it – so it also has the ability to export image sequences where you have something like a vector art that takes various input parameters and they can export it as a sequence of PNGs for example for Apple Watch. But I use it to create an animated GIF to explain some graphics APIs in a slide show presentation which is amazing because you can embed that into your slide deck. It acts exactly as Core Graphics does. So that’s my first.
Jetbrains:
The unicorns Silicon Valley doesn't like to talk about. Jetbrains for iOS developers mostly known for app code which is an amazing IDE. This article, Prashant actually describes that silently over the course of the last ten years. Jetbrain continue to improve their tooling to be among the topnotch IDEs. I personally think that their IDEs are the best. It might not look as pretty as XCode does look like but that’s the same angle he puts out on his article. It might not be sexy at first glance but actually it’s rock solid and great.
My third one, I stumbled over it this morning. It’s an article. Her name is Tia Hardy Robinson. The article’s title is How to Move to Germany— the country where I’m from— How to Move to Germany if Donald Trump is Elected President. [Laughter]
HEIKO:
At first the title resonated with me but also it reminded me how awesome the country I’m from is. So I always consider the Silicon Valley to be the promise land for any programmer and I moved here and it’s all great, but actually she has her point. Not only do we have beer and bratwurst and all that; we actually have a great social system, tuition fee, university and employment and guaranteed housing and everything. It’s just great to get reminded of how my country could actually operate. So these are my three picks.
DANIEL:
I asked one to drop another pick is that talk, Kendal Talk 2010 called What We Actually Know About Software Development and Why We Believe It’s True which— in which college professor start the book in many of the meets that we repeat and repeat and repeat over and over like the meets of the 10x parameter, the meets of the box get during the sign phase are cheaper than box get in— get in their later parts of the development process. It’s just amazing how many things we simply believe because we read them. How unscientific we are believing those things without proof, without scientific proof that those statements are true.
The talk finishes with a call for be more scientific, more ask yourself questions where those things come from because that part is very important in the engineering mind. We are not going to be proper engineering until we adapt many of those practice in other engineering fields.
CHUCK:
Alright. Well I’m going to just pile on that. We had Greg Wilson who give that talk and Andreas Stefik on Ruby Rogues about a year and a half ago. We talked about that talk and we talked about the ideas behind it. It was about a two hour conversation and it was really, really fascinating. So go watch the talk then go listen to the Ruby Rogues Episode.
DANIEL:
I will. I didn’t know about that.
CHUCK:
Alright. Well I don’t think we have anything else. If people what to check out Pebble, do you want to just plug the Twitter web site, anything else really quick?
HEIKO:
Sure. So that we’ll be for developers. So developer.pebble.com or if you want to engage with us on twitter, that’s pebbledev like pebble and dev for developers. We have a very vibrant select community. I don’t know actually how to participate on that. You could just— I don’t know— select and [inaudible] on Twitter and I would tell you. But we have thousands of developers hanging out over there.
CHUCK:
Alright. We’ll go ahead and wrap up the show. Thank you both for coming. Thank you to our panel as well and we’ll catch you all next week.
[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.]