00:00:05 ◼ ► And I'm David Smith. Under the Radar is never longer than 30 minutes, so let's get started.
00:00:19 ◼ ► Well, I feel like, you know, you have two frequent hit points that inspire you to make a new app.
00:00:26 ◼ ► Point number one is when, you know, if it's a watch app, if you figure out something you can do on the watch,
00:00:33 ◼ ► Point number two is if there's a new hardware capability of the new generation of devices.
00:00:44 ◼ ► You found something new to do on the watch, especially, you know, even in the area of something like API-level stuff,
00:00:49 ◼ ► and also the Series 5 watches added a compass, which no one can really figure out what to do with,
00:01:02 ◼ ► So, one of the things that--so when all the reviews came out for the Series 5 Apple Watch,
00:01:14 ◼ ► and in most of these, there is a picture of the new California face with the moon complication in sort of its bottom slot.
00:01:35 ◼ ► what you choose as your watch face and what your complications are is now suddenly something that's a bit more--
00:01:40 ◼ ► I'm trying to be a bit more thoughtful of, because it's constantly visible to the world and to me all the time.
00:01:57 ◼ ► And then I looked down at my wrist, and then I looked at the moon, and the two weren't the same,
00:02:02 ◼ ► which bothered me a lot, because here I have this watch that is incredibly powerful and capable,
00:02:10 ◼ ► has a GPS coordinate, it's able to--I could model the entire solar system with the computational capabilities of this watch.
00:02:17 ◼ ► And here I have this complication that's a picture of the moon that doesn't look like the moon that's directly in front of me,
00:02:25 ◼ ► And when something like this bothers me, I have a tendency to not be able to let it go very easily.
00:02:32 ◼ ► And so I then embarked on a week-long journey down astronomy and all kinds of weird math,
00:02:40 ◼ ► some of which I understand, some of which I have no idea about but can just apply the formula.
00:02:53 ◼ ► It is available now in the App Store, and in addition to just being something that now has scratched a niche
00:02:58 ◼ ► and solved a problem that I had, I've for a while been looking for an opportunity to make a watch-only app,
00:03:11 ◼ ► as well as just make folk thinking a lot about watch face and complications as they relate to always-on-watch face.
00:03:33 ◼ ► And things that are kind of my intuitive thought about how the moon looks and how it moves through the sky,
00:03:45 ◼ ► And I think in my mind though, you kind of have in your mind that the moon is always straight up and down.
00:04:06 ◼ ► But it actually kind of rises, at least in the northern hemisphere, or if you're in the northern parts of the world,
00:04:53 ◼ ► And there's a bunch of math you can do to work out what that looks like, but that's all that's happening.
00:04:59 ◼ ► But here I am, you know, 36 years old, looking at the moon my whole life, and I've never really thought about that.
00:05:24 ◼ ► because the degree to which it's rotated and the way it looks to you is impacted by your latitude,
00:05:30 ◼ ► it's impacted by the declination of the moon, which is where the moon is relative to the equator.
00:05:37 ◼ ► So the moon isn't actually always directly above the equator, it oscillates up and down along the equator,
00:05:43 ◼ ► and so that's part of it, and there's all kinds of these cool little math things that you have to do.
00:05:48 ◼ ► So it was fun to kind of just dive in, learn just enough to be dangerous, just enough to do the math so I can rotate it.
00:05:56 ◼ ► I will say testing this has been really kind of slightly comical, because A, it's like,
00:06:04 ◼ ► I can just go outside and look at it, but then you have to adjust for what is it like in the southern hemisphere,
00:06:14 ◼ ► Thankfully there's a whole bunch of different resources online that I can simulate different places in the world,
00:06:19 ◼ ► and then in my code I'll say, "Well, what if I was in Sydney and looking at the moon right now,
00:06:24 ◼ ► what would that look like?" And so I can kind of test it, but it is an amusing kind of quality assurance.
00:06:29 ◼ ► And in some ways I did feel a bit funny launching it before I was able to test it for a full month.
00:06:37 ◼ ► Yeah, I was going to say, the lunar cycle, the Apple Watch Series 5 has not been out for a complete lunar cycle yet.
00:06:44 ◼ ► No, which is slightly funny. Thankfully, the way the app works is it lets you preview the moon's cycle with a digital crown.
00:06:53 ◼ ► So if you swipe, if you roll the digital crown back and forth, it'll time shift through time,
00:07:02 ◼ ► And so I can just kind of assume that as long as that logic is reasonable, that the actual,
00:07:12 ◼ ► But that is kind of a funny thing that I realized. It's like, I've only ever seen the app in real life
00:07:22 ◼ ► And so it's like, I hope it works for the gibbous moons and the full moon and all the other parts of it.
00:07:32 ◼ ► That's pretty cool. I also like, I love this, like, you know, so as everyone knows, I'm a watch nerd,
00:07:42 ◼ ► And all they can do though, because they don't know your location, you know, so I mean maybe,
00:07:48 ◼ ► there have been occasionally watches that will do some things like sun art and sunset calculations
00:08:09 ◼ ► So you know, the moon phase complication on most watches doesn't have it properly rotated and everything.
00:08:25 ◼ ► It's exactly the kind of little detail that Apple should be doing with their own built-in stuff.
00:08:47 ◼ ► It's just so cool to have this, because now you can have a good moon phase complication
00:09:07 ◼ ► And like, this is a perfect example of something where it makes sense to do an app like that.
00:09:30 ◼ ► I'm not sure I would have... It would have felt like I was biting off more of a problem
00:09:49 ◼ ► Because intrinsic to a watch app is that it's so limited because the screen is so small.
00:10:20 ◼ ► And that's just a cool thing about having more customization and more flexibility with watch face design.
00:10:28 ◼ ► I think it's just a lovely aspect of the watch that I think there's been not as much exploration of it.
00:10:43 ◼ ► And I'm enjoying the thought and the process with this, as well as a few other ideas that I'm kicking around
00:11:01 ◼ ► and then as the day progresses, it sort of slowly rotates inside, and I know what's happening there.
00:11:05 ◼ ► Like, that's cool, and that's personal, and it makes me feel more connected to my watch, which I like.
00:11:16 ◼ ► You can get a server running in just seconds with your choice of Linux gesture, resources, and node location.
00:11:40 ◼ ► And, so you don't have to stress about overspending, Linode has designed their pricing tiers
00:12:33 ◼ ► Give Linode a try today. That's Linode.com/Radar and promo code radar2019 to learn more,
00:12:45 ◼ ► So the other thing that was kind of fun about this is that I got to use SwiftUI for the first time.
00:13:16 ◼ ► But I've got to say, it was really cool to use and compared to WatchKit, it is night and day.
00:13:38 ◼ ► It was just so amazing given the number of hacks and the weird things I've had to do in the past
00:14:04 ◼ ► And what I end up doing is in Core Graphics, I render UI images and I just keep updating them onto the screen.
00:14:25 ◼ ► It's not something that anyone should do. Don't go down that road. It was a terrible idea.
00:15:05 ◼ ► And it interacts properly with our digital crown and is flexible between the different watch sizes.
00:15:54 ◼ ► And a lot of the way that SwiftUI is composed with the way methods are sub-classing or extensions or those types of things,
00:16:08 ◼ ► it's hard to work out what methods you can call on what objects or what customizations will work and what right things.
00:16:42 ◼ ► I gave up. The first day I tried to use the live preview thing that they have where I booted up into Catalina so that I could use that,
00:16:55 ◼ ► And ultimately, it's kind of a cool thing, and I could imagine when that works, it being really cool and flexible.
00:17:10 ◼ ► And so you always have the classic thing of can you type faster than the compiler can finish,
00:17:15 ◼ ► because otherwise you end up with this weird case where you've half implemented a method or a function or whatever it is,
00:17:26 ◼ ► But eventually what kept happening is it seemed like it would crash the preview and then I'd have to restart it.
00:17:35 ◼ ► It's just a very tight build and run cycle that I just kept-- I would make a change, build and run,
00:17:42 ◼ ► and if I'm doing this on the simulator, it was nice and speedy and worked nine times out of ten pretty well.
00:17:50 ◼ ► And so that worked reasonably well. I would say stay away from previews, at least at this point on the watch.
00:17:58 ◼ ► And then the other thing is the error messages you get with SwiftUI, if you mess something up, are just--
00:18:06 ◼ ► I don't even know. They're not error messages. They're not in any way descriptive of what the actual problem mistake you made.
00:18:13 ◼ ► The line of code that it points to as being the problem is never the actual line of code.
00:18:38 ◼ ► For SwiftUI, the debugging scheme when you have a weird cryptic error message is you just start commenting out code
00:18:53 ◼ ► Okay, I do. So then I need to-- then the next half and the next half, and eventually you find the line of code
00:18:59 ◼ ► that when you comment it out, the error goes away. And that's the best you can do at this point.
00:19:04 ◼ ► And most of the time the error message is something just very strange, like, "Can't convert void this into open and close parentheses."
00:19:13 ◼ ► And you're just like, "Okay." It turns out it's actually that you call the method with the wrong value,
00:19:28 ◼ ► And I got a bit better after the course of a week of using SwiftUI, of guessing what the error was based on how cryptic it was.
00:19:36 ◼ ► But I gotta say, the tooling for this needs to come a long way before it kind of feels worth doing.
00:19:44 ◼ ► I don't think on iOS at this point. I would recommend going down this road because UIKit is just--
00:19:49 ◼ ► it can do everything that SwiftUI can do, whereas-- versus like WatchKit, which just can't do these things,
00:19:57 ◼ ► so it isn't worth it. And at least with UIKit, the error messages are reasonable, it's very well documented,
00:20:04 ◼ ► there's lots of examples, there's lots of places that you can go to get help. If you have something weird happen,
00:20:09 ◼ ► UIKit is not without its bugs and its quirks, but I feel like they're fairly well understood.
00:20:15 ◼ ► I know what's going wrong with UIKit, whereas with SwiftUI, sometimes it was just like, "I don't know what's going on."
00:20:23 ◼ ► Yeah, SwiftUI, I think a lot of this is just because it's so young, and I expect a lot of this will be fixed over time,
00:20:30 ◼ ► but there's also a substantial discoverability problem with, as you mentioned earlier, like, what can it do?
00:20:38 ◼ ► What methods can I call on this object? There's a huge discoverability problem there, and the almost complete lack of documentation is not helping here.
00:20:46 ◼ ► And then there's also, in the implementation of SwiftUI, as basically a DSL inside of Swift, which is itself a very, like, you know,
00:20:56 ◼ ► compiler, complex, syntactically complex language, you know, adding a DSL on top of that makes the tooling even more complex,
00:21:04 ◼ ► and it makes it so that I'm not sure it's ever going to be possible to have really great error reporting, like, by the compiler.
00:21:13 ◼ ► I think it can certainly be improved from where it is now, but unless there is some significantly deeper integration with SwiftUI being, like, special-cased in Xcode,
00:21:23 ◼ ► and how it handles things, and how the compilers report errors and everything, it's going to be hard to ever make a lot of these things more useful,
00:21:29 ◼ ► or more intuitive, or nicer, and more friendly. SwiftUI, it's always going to have this problem of, like, it is visually very pleasingly simple.
00:21:39 ◼ ► Like, when you see SwiftUI code, you're like, "Wow, that's so beautiful!" But writing it is a different story.
00:21:44 ◼ ► Writing it is, you know, especially when you aren't that familiar with it yet, you can know Swift, and you can know UIKit,
00:21:51 ◼ ► and those things are not very helpful here, because it's a totally different language, and, you know, it's a language inside of Swift,
00:21:57 ◼ ► and I think it's just going to, there's going to be, I think, a certain ceiling of how friendly it can ever get.
00:22:03 ◼ ► And we're nowhere near that yet, but I think it's always going to be more complex than it appears to be when you see code on slides.
00:22:13 ◼ ► Probably, yeah. I think that's just the nature of these kinds of things, like, when it works, it's magic,
00:22:19 ◼ ► and in my experience, any programming environment or philosophy that has that kind of, like, when it works, it's magic thing,
00:22:28 ◼ ► like, when it doesn't work, it's terrible. It falls down very hard and aggressively, but when it works, it's amazing.
00:22:36 ◼ ► And so that's just kind of, I am slightly hopeful, I'm just thinking of back in the day where, with Objective-C,
00:22:42 ◼ ► all of the work they were able to do with the static analyzer, and how they were able to pull things out of the code
00:22:51 ◼ ► that weren't just, like, compiler, like, you could use what the compiler knew to make lots of inferences
00:22:58 ◼ ► and help give you, you know, these very clever, I'm thinking even back before automatic reference counting,
00:23:05 ◼ ► like, back in those days where it could do some really clever things, and I'm hopeful that, like,
00:23:11 ◼ ► they could do a similar thing with SwiftUI where they can give, they can infer what is, like, right now,
00:23:18 ◼ ► what's happening is we're getting the, like, the actual compiler messages that are just, like, just from the Swift compiler.
00:23:25 ◼ ► And I would hope that eventually we could get to a place that there is, like, the Swift compiler,
00:23:29 ◼ ► and then there's, like, the static analyzer that is running on top of that to look at what's, like,
00:23:34 ◼ ► look at the, when I get this error, like, what does this actually mean? And in some ways, like, maybe it can do the thing that
00:23:40 ◼ ► I'm doing where I'm, like, commenting out code to, like, find the line that is actually causing the problem,
00:23:46 ◼ ► and, like, it can do that analysis very quickly, like, in real time where it just tries to remove different aspects of the,
00:23:53 ◼ ► of my code tree and says, like, this seems to be the part that is causing this problem, or who knows.
00:23:59 ◼ ► Like, they've gone down this road enough in the past that I'm hopeful, but yes, right now it's tricky.
00:24:06 ◼ ► And I guess the last thing I wanted to touch on is the, my experience using the watch app store.
00:24:11 ◼ ► Oh, yeah, because it's a watch-only app, so the way people are supposed to get it is by, can you buy it on the phone, or do you have to buy it on the watch?
00:24:17 ◼ ► Yes. Well, this is, I guess, so the first thing I wanted to, like, I, one of the main reasons I wanted to, like, make this app is
00:24:22 ◼ ► I had no idea how this process would work. Like, does it work with TestFlight? Can you, how do you sell it?
00:24:28 ◼ ► Can you link to it? Because, like, if, you know, if I have a link for the app, like, what does that mean on the watch?
00:24:33 ◼ ► There's no, like, browser on the watch? And so, a couple things. So it does work in TestFlight.
00:24:39 ◼ ► You can upload a watch-only app to TestFlight, and it, the process is basically the same for anything, and you just, in TestFlight, it'll just say, like, watch only, and you, you know, install it to the watch.
00:24:51 ◼ ► So that works just fine. On the iOS side, like, when you're submitting the app, it's everything you kind of would expect.
00:24:59 ◼ ► Like, the setup of the screen, like, it has, still has all the slots for, like, the iPhone screenshots and things, but they're not required.
00:25:06 ◼ ► So you only have required to set the watch screenshots. And then, once the app is out in the world, it shows up in both the iOS and WatchOS app stores.
00:25:18 ◼ ► You can buy it, and link, if you link to it, they'll obviously go to the iOS app store page for it.
00:25:26 ◼ ► And they can buy it there. And, in theory, I think what's supposed to happen, and I'm not sure if this is controlled by the, like, automatically install apps setting in the watch, uh, companion or not.
00:25:38 ◼ ► But I think what's supposed to happen is you buy it, and then it just shows up on the watch.
00:25:47 ◼ ► In fact, that is often not the case. And you can end up with these very cryptic messages, and it's very inconsistent, and I've had, basically what I've had to do is tell a lot of people that what you do, if you bought it on your phone, is you go on the watch.
00:26:00 ◼ ► If it doesn't show up automatically, go to the app store on the watch, scroll all the way to the bottom, there's, like, an account area there, you hit account, and then you hit purchased, and then you should be able to install it from there.
00:26:10 ◼ ► And that works for most people. You can buy it on the watch itself. However, you really need to think through the name of what your app is.
00:26:21 ◼ ► Because people have to find it in one of two ways. They either have to scribble the words one letter at a time, and then they need to be able to actually scribble those letters, or they need to be able to say it out loud to Siri and have it take dictation.
00:26:42 ◼ ► Oh, God, wait, let me try. Dictation. Moon++. Okay, it says and Moon++, and it brings up nothing. It brings up one thing that's in German.
00:26:53 ◼ ► That is not what you want. It turns out that what you have to say, if you actually want to search for it, is Moon plus sign plus sign.
00:27:01 ◼ ► That is the way that you correctly search for an dictation, which is not something anyone would intuitively think about.
00:27:11 ◼ ► So I've been spending all morning trying to come up with better names for these things.
00:27:16 ◼ ► Usually when you come up with a new name, you think about, like, is the domain available? Is there another app like this in the App Store?
00:27:22 ◼ ► I'm spending all morning just talking to Siri, saying things out loud, and seeing what it thinks I said, and trying to say it in weird ways, or playing music in the background, and then saying it, and seeing if it works.
00:27:34 ◼ ► So this experience is not great. But this is the early days, and I think the Watch App Store is a weird place, too.
00:27:43 ◼ ► Because right now, I think there's like eight or nine, maybe ten apps that are being featured, when you actually open the App Store. There's like ten apps there.
00:27:52 ◼ ► I imagine if you're one of those apps, good news. That's great. If you're not, you don't exist.
00:28:00 ◼ ► Do you think anyone's really going to this? I just scrolled through now. It's kind of a painful experience. I don't think anyone's really going to be doing this.
00:28:09 ◼ ► Maybe not. I don't know. But if you're a watch-only app, it seems like an important place to show up.
00:28:19 ◼ ► It's an awkward experience. I don't know if it's worth it. If I had just made an iPhone app, things would have been a lot simpler.
00:28:29 ◼ ► But I kind of like that I didn't have to. I think I just need to come up with a better name, test that name through Siri, and hopefully, too, there's a lot of things that seem to be complicated.
00:28:43 ◼ ► The series one and two Apple watches don't support watchOS 6 yet. So people who get these weird error messages that say they need to update their watch, but they can't update their watch.
00:28:56 ◼ ► Because watchOS 6 isn't available for those yet, but it will be at some point. At this point, watchOS 6 was released for the series 3, 4, and 5 watch, but it has not yet been released for the series 1 and 2 watch.
00:29:09 ◼ ► But they're not incompatible. They will have it. Just not yet for some reason. Just not yet. For whatever reason.
00:29:15 ◼ ► Oh, I love this rollout so much. So this has been my week. The customer support side has been a bit of a pain, but making a watch app has been a lot of fun. Making complications is my new favorite thing, and I'm going to be making dozens of these, I suspect.