An exploration of Apple business news and technology. We talk about how businesses can use new technology to empower their business and employees, from Leo Dion, founder of BrightDigit.
[00:00:00] Pre-Order Bushel
---
[00:00:00] Leo Dion (intro): Hello folks. If you've been following me for the last couple years, you know what I've been working on. Today I'm about to unveil the final piece of that puzzle. It's Bushel the Mac OSS virtual machine app designed by developers for developers. You've seen it grow and now it's ready to revolutionize your app development process.
[00:00:18] Leo Dion (intro): With bushel, you have the power to snapshot and roll back your machine effortlessly. Just like saving your game process. It's the tool you've been waiting for. No more compatibility worries. Bushel lets you explore diverse MAC OSS versions and configurations, ensuring your app's flawless performance. The weight is over.
[00:00:36] Leo Dion (intro): Bushel is now available for pre-order, so get ready to unlock the ultimate app development experience. Save the date bushel drops on December 15th. Continuing our journey together in redefining app development, pre-Order today and let's build something incredible with Bushel. Your support has brought me this far and I can't wait for what's ahead.
[00:00:58] Leo Dion (intro): Thank you and enjoy the rest of this episode. I.
[00:01:03] Intro and Public Speaking
---
[00:01:03] Leo Dion: Welcome to another episode of Empower Apps. I'm your host, Leo dn. Today I'm joined by Elena Kafkas. Elena, thank you so much for coming on.
[00:01:12] Alaina Kafkes (guest): Ah, thank you for having me, Leo. It's cool to get to chat with you and I think this is the first, I think maybe the first iOS podcast I've ever been on. So exciting for me as well.
[00:01:25] Leo Dion: yEah, I was really excited to have you on. It's a topic I've been interested in was today's topic, which is app intents. Read your article about your work at Calm. But before we begin, I'll let you go ahead and introduce yourself.
[00:01:37] Alaina Kafkes (guest): Yeah, sure. So, I am a senior software engineer at Column right now, and I, throughout my career have like primarily focused on iOS, which has been. Very cool. I honestly feel like it was something that I fell into and I feel incredibly lucky to have done. So, I guess besides working, I feel like my outside of, not like a, not like a passion project, but I find it fun to go speak at conferences.
[00:02:04] Alaina Kafkes (guest): So you might see me on like the iOS conference circuit, or you might have already, if you're around.
[00:02:10] Leo Dion: Any future conferences you're gonna be at?
[00:02:14] Alaina Kafkes (guest): No, but I'm like contemplating 2024.
[00:02:18] Leo Dion: Yeah. Yeah. I've.
[00:02:19] Alaina Kafkes (guest): want to do yet, but I'll think about it like very soon.
[00:02:22] Leo Dion: Yeah. Yeah, it's a great experience. I love speaking at conferences. I think I will be speaking at least one conference next year I know of. So, be on the
[00:02:31] Alaina Kafkes (guest): that's exciting.
[00:02:31] Leo Dion: But yeah, it is exciting. But yeah yeah, it's a great experience. I highly recommend people give it a shot and fill out a CFP. Yeah.
[00:02:41] Leo Dion: So let's talk about APP and let's jump right into it.
[00:02:45] What are App Intents?
---
[00:02:45] Leo Dion: First of all, what are app intents? Maybe let's start with that before we jump into the why.
[00:02:53] Alaina Kafkes (guest): That is a good question. So app intense is a framework. It was released by Apple in WWDC 2022. And as Apple phrases, it, it is a programmatic way to make your app's content and functionality available to system services. So my read of that sort of Apple speak is basically it allows users or app intents are a way to allow your users to take an action within your app using something like Siri or the Shortcuts app Spotlight, and then also like the action button on some devices.
[00:03:32] Alaina Kafkes (guest): And like a good example would be like if you say like, Hey Siri, do X, like that might be invoking an app intent.
[00:03:41] Leo Dion: Yeah, so it's kinda like. How do I put it? It's, it's a, it's a framework which upon you could like do other things such as Siri. The one that I keep thinking of is when I constantly accidentally turn my wrist on my watch and it shows me the calendar, and then I'm on my Mac and it says, Hey, by the way, you're has the little thing at the bottom, you know, in the dock where it shows calendar watch.
[00:04:04] Leo Dion: And I'm like, yep, that's right. I did accidentally load up my watch. So yeah, that's, that's what I'm familiar with. But why? Why kinda, what was the maybe business decision, I don't know how much you're gonna answer this, but how much was it of a business decision? Was it to be like, Hey, let's do app intense for calm.
[00:04:22] Leo Dion: What? What was the thought process on that?
[00:04:25] Alaina Kafkes (guest): Yeah, that's, that's a good question. So I feel like calm chose to pursue creating app intents. Actually, I'm gonna rephrase a little bit. So Calm had pre-existing Siri kit intents, but we actually implemented them wrong. That's my understanding after working on this project. So we ended up like.
[00:04:47] Alaina Kafkes (guest): Ditching that old buggy implementation that wasn't really worth maintaining and as soon, like when we saw app intense at ww DC 2022. So like that was kind of like a technical motivation. Another technical motivation would be getting more comfortable with like, sorry, with like async, AWAI and main active.
[00:05:08] Leo Dion: Yeah, I remember that in the
[00:05:09] Alaina Kafkes (guest): bad.
[00:05:11] Leo Dion: Yeah. 'cause you wanted to, you wanted to take the opportunity to upgrade to Async away, and that was part of what Apen Hunts was was
[00:05:18] Alaina Kafkes (guest): Yes, it was a, a good, good little trial. And then there were like the, the business reason was kind of like we had started to shift our focus more to user engagement because we realized that lots of people. Download the Calm app in like a time of crisis, but sometimes they like don't, yeah. They forget about it.
[00:05:39] Alaina Kafkes (guest): Or like they see the home screen and they're like, now what? So we have been pursuing a lot of like projects around like better engaging our users with the app, like giving them like what they want and something that they would want to come back to from like a mental health perspective.
[00:05:56] Leo Dion: Does app intense replace Siri kit, if you know what I mean,
[00:06:01] Alaina Kafkes (guest): Yeah, so this is a great question and I'm gonna call out. I made a mistake here when I went into this project. I did not know the answer to this question, and I found out the answer quite late in the game. So, app intents do not replace Siri kit. So app intents are basically what you should be using for for custom intents that aren't already supported by Siri Kit like.
[00:06:26] Alaina Kafkes (guest): Siri kit for instance, has like, I don't know, like play media intent. I know there are others. There are like subclasses of ion intent that you should be using if they exist and if they meet your need. But if they don't, then app intent is better.
[00:06:42] Leo Dion: Okay. Okay, that makes total sense. So. That was interesting.
[00:06:47] Why App Intents
---
[00:06:47] Leo Dion: Like a big, big thing you mentioned was user engagement, which is super difficult with with apps because we all think, oh, the success is getting someone a, getting your app built, getting approved from the Apple store and then getting people to download it.
[00:07:01] Leo Dion: That's all great, but like if nobody's using it, like you kind of screwed so.
[00:07:06] Alaina Kafkes (guest): Yeah.
[00:07:07] Leo Dion: The, like, the user engagement, like that seems like a big selling point for, for, for you implementing this in your app. What are, what do you think are some, like, calm, we all know what CALM does but like what would be some other apps that you think would be ideal for implementing this in their application?
[00:07:28] Alaina Kafkes (guest): Ooh, that's a, that's a good. Question before I answer it, I realized that I might not have been entirely clear on why app intent even relate to user engagement, and I just wanted to call out that like when you use the app intense framework you are able to get kind of this like auto magical, um, exposure of your app, intent to like series shortcuts and spotlight as soon as the user downloads the app.
[00:07:53] Alaina Kafkes (guest): So I just wanted to make that
[00:07:55] Leo Dion: okay. Okay. Yeah, yeah, yeah,
[00:07:57] Alaina Kafkes (guest): but to actually answer your question of like what sorts of apps should be using app intent, um, I think the, like the generic answer would be like an, an app in which you could imagine, a, a user actually wanting or needing to invoke actions via Siri. So I don't know.
[00:08:21] Alaina Kafkes (guest): Siri is just the thing that pops into my head when I
[00:08:24] Alaina Kafkes (guest): I think of shortcuts like secondarily, but I. Another, like a, something that I've read about but I'm not like a total expert in necessarily, is that Siri is often used by people with certain like neurocognitive differences.
[00:08:41] Alaina Kafkes (guest): And I actually heard in a conference talk by, I believe Robin Kza, I'm not sure if I'm pronouncing her last name that like offering multiple ways to do. The same thing. To take the same action is great from an accessibility perspective because like maybe all of these different ways are accessible to me, but like for someone, one way, one path of entry into the app is like more accessible than another, or like one way of doing an action would be more accessible than another.
[00:09:10] Alaina Kafkes (guest): So that redundancy can be positive from an accessibility perspective.
[00:09:15] Leo Dion: The short to me, like, not the shortcuts, but the spotlight seems like a big selling point because like if I'm gonna, if I'm gonna pull up my phone and like, you know, try to search for something and it's like, Hey, by the way, here's your directions to so and so, or here's a, why don't you go to Starbucks thing?
[00:09:33] Leo Dion: It's gonna be like a little bit more tempting for me to use the app. And like that to me is one of the bigger selling points, is that it. From my my understanding is it uses intents to figure out when you're more likely to use the app and then suggest it in spotlight. And to me, like that's a big gain.
[00:09:49] Leo Dion: If you're trying to get user engagement.
[00:09:52] Alaina Kafkes (guest): That's very fair. It's like subtle but powerful because I am using Spotlight regularly, but I don't think that I'm using Spotlight regularly because like, I, I, I mean, again, I would guess that your average, like iPhone user does not necessarily know that that feature's even called Spotlight. They're just like, oh, it's the search thing.
[00:10:11] Alaina Kafkes (guest): So it's subtle.
[00:10:13] Leo Dion: Yeah, yeah. Totally. Exactly, exactly. What is, what's the relationship, and correct me if I'm wrong, but is it, what's the relationship between app intents and NS user activity? Are those related in any way, or is that something totally different?
[00:10:27] Alaina Kafkes (guest): that's a good question. I think that they're different. They might be related, but I did not end up u using any of the like NSS user activity APIs for this particular project. I think that w the way. If I'm not mistaken, but like, there is like this concept of donating intents that comes from Siri kit and it's like really odd phrasing, but what donating intense.
[00:10:52] Alaina Kafkes (guest): It's like, what, what? Yeah, it took
[00:10:54] Alaina Kafkes (guest): me a
[00:10:55] Leo Dion: how generous of you. Yeah.
[00:10:56] Alaina Kafkes (guest): Yeah. And, and basically it's like that, that is like another way of telling Spotlight like, Hey, this user is like taking this particular action. Like they're playing this particular piece of content. Within the call map at this particular time of day, and then maybe you would start to see spotlight suggestions at that time of day.
[00:11:16] Coding Challenges
---
[00:11:16] Leo Dion: Yeah, yeah, yeah. Exactly. Exactly. I wanted to ask next what were your biggest challenge was, but before we do that, I'm gonna, I'm gonna hop back and I'm gonna ask this technical question because you mentioned it in the article and you mentioned it earlier, but like a sink of weight. What was that experience like?
[00:11:34] Leo Dion: Migrating or implementing, using a syn away in calm.
[00:11:39] Alaina Kafkes (guest): So great question. Like, to be super clear, the majority of the calm app does not use a single weight. There are just like some places where we have been branding like, I don't know, new things and
[00:11:49] Leo Dion: app. You're not gonna like go in and overhaul it. Yeah, it totally makes sense.
[00:11:54] Alaina Kafkes (guest): But honestly for me, the concept wasn't difficult. And I think it was because at my previous job I had written some, I guess like backend, like JavaScript code that had
[00:12:08] Leo Dion: Prom. Not
[00:12:09] Alaina Kafkes (guest): if that makes
[00:12:10] Leo Dion: Yeah.
[00:12:10] Alaina Kafkes (guest): Yeah. Like based effectively promises. So for me, the learning curve had already happened in like another programming language.
[00:12:20] Leo Dion: Yeah. Yeah. I think for me, I'm in the same boat. It was JavaScript or C that had already done async away, essentially. So it wasn't too much of a challenge, but what was, was the whole ta how to deal with tasks, like doing multiple tasks at the same time. The the whole actor concept is still something I feel like I'm trying to wrap my head around.
[00:12:44] Leo Dion: So that's probably more of the challenge, but yeah. Yeah, yeah. Exactly. Exactly. Yeah. Fair. Good. It was. I think we, we have same experience there. So, so besides that, what was the biggest challenge implementing app intenza? What kind of like issues did you run into?
[00:13:00] Alaina Kafkes (guest): Yeah, that's a, that's a good question. I feel like the overarching answer is just the, so the, I think that the framework, it came out in ww DC 2022 and my, like me and like my fellow engineers started working on this, let's say like. A few months after that. So just the newness of the framework meant that there was nothing on Stack Overflow, nothing, no answers on the developer forums, and then like the documentation, sometimes you would just see the, I don't know if it said like beta software, but it was just like, okay, every, you can't trust anything written here,
[00:13:38] Leo Dion: Yeah. And on top of it, it's an abstract framework, right? It's not like, oh, I know exactly. This is for doing virtual reality on the vision Pro. Like you can know exactly what it is. This is a very, like you said, it uses certain terms like donate and intent that are very, very, very abstract. So yeah, I could, I could see how the challenge is there.
[00:13:59] Alaina Kafkes (guest): That's a really good point too. But I, I will say that I think the most concrete challenge, at least for me, was string localization. And that might be because I was working within like this. I don't know, pre-existing legacy app, if you will. And we already have like, strong like scripting and automation around like converting NSS localized strings into, or like converting them into like a file format that like a translator could read.
[00:14:30] Alaina Kafkes (guest): And like make translations of and then get back to us with those translations and have that just automatically like get into like the app store builds, we submit. So the app intense framework requires this new type called localized string resource that just doesn't like play in the same way as NS localized string.
[00:14:51] Alaina Kafkes (guest): So like bridging between those, I mean I had to do some. Honestly kind of shady things that I wouldn't recommend, but like I think that's just sometimes true within like a legacy app environment. But if you're just like trying this for like a side project, you'll be fine.
[00:15:07] Leo Dion: Okay. Okay. What, so string localization, anything else you ran into that you were surprised by when you were implementing it?
[00:15:16] Alaina Kafkes (guest): When I was implementing app intents I noticed that whenever I was doing something, some sort of action within an app intent that would touch realm, I had to be like very careful with the threading.
[00:15:29] Alaina Kafkes (guest): Like I was just wondering why things weren't working or why, why the app.
[00:15:33] Leo Dion: I Was gonna
[00:15:33] Alaina Kafkes (guest): crashing, but that was challenging. I like, somehow the specifics have like left my mind, which is maybe a good thing in a way, but like I remember generally that was, that was difficult. And that was not a challenge that I wrote about in the blog post that I published for Calm.
[00:15:53] Leo Dion: So what what were some architectural challenges that you ran into with app intents? Like, is it, it's, is it an extension or is it part of the app itself? Or, and like, how did you have to work around the, the existing infrastructure to get it to work properly?
[00:16:11] Alaina Kafkes (guest): That is a good question. So, I did not implement this as an extension. I'm pretty sure that there are two paths with app intent, either just adding the intents to your, I guess, main target or creating an extension. I think both are valid. If I recall correctly, in the documentation, apple says that it is best to just implement them within the main target, and the extension is kind of like.
[00:16:37] Alaina Kafkes (guest): It, I don't know. There was some like exception, but the calm app did not meet that exception, um, for architectural challenges. Fortunately, like these app intents are basically these like, I don't even know. They're not really touching. I. Like other parts of the Calm app. I think that the biggest technical challenges were like working with Realm and like the threading concerns that come up there.
[00:17:02] Alaina Kafkes (guest): And then the string localization that was not, it's not so much like an architecture thing, but like we have all these like scripts and automated processes and this new localized string resource type just doesn't naturally fit into them. So.
[00:17:19] Leo Dion: Okay. Okay, that makes a lot of sense.
[00:17:21] Components of App Intents
---
[00:17:21] Leo Dion: What are, so let's, let's kind of break down. The components of app intents. So you talked about donating. What, what do you mean? Let's, let's start off with what's an intent exactly.
[00:17:33] Alaina Kafkes (guest): Just think of it as like a piece of functionality or like an action that you can take within the app.
[00:17:40] Alaina Kafkes (guest): Like for instance, on Calm, you can. Play the Daily Calm or like one of our like content types. But there also could be an app that's like, or sorry, there could also be an app intent for like a different app that's like, rate this book or whatever. And you have this like mini UI
[00:17:59] Leo Dion: Yeah. Does, does it take parameters or is it specifically just one specific thing that it does?
[00:18:08] Alaina Kafkes (guest): That's a good question. So it does take parameters if you so choose. Like you can have like an app intent that only does one thing, doesn't need parameters. But yes, the app intent that you create can take parameters that kind of like change what it does slightly or more like variations on a theme, if you will.
[00:18:27] Alaina Kafkes (guest): Like for instance, in the Calm app, we have, I believe four types of. Daily meditations and meditations where you get a new one every day. So I created an app intent with a parameter that's like daily meditation type that allows you to play each of those four dailies by like invoking. Basically the same command on Siri.
[00:18:52] Alaina Kafkes (guest): It's like, Hey Siri, play the daily calm on calm. Hey Siri, play the daily trip on calm, et cetera. Like you can tell that there's like a little bit of a string formula there.
[00:19:02] Leo Dion: Yeah, yeah, yeah. Okay. That makes, so that makes total sense. So what other components are there to app intents?
[00:19:10] Alaina Kafkes (guest): Yeah.
[00:19:11] Leo Dion: you need to do, like in an app delegate? Is there anything special you need to do with Swift ui? I guess I.
[00:19:16] Alaina Kafkes (guest): Yeah, these are good questions. So, in re Swift UI, if you were to create so calm doesn't, does calm, does not do this. First of all, all of the Calm app intents just like start playing content, so there's no like UI needed there. But in the example that I mentioned that's like, write this book as an app intent, you could create like a little.
[00:19:40] Alaina Kafkes (guest): Mini user interface using SWIFT ui. I'm the name for that escapes me. But there is like a specific way of doing this within the app intense framework.
[00:19:49] Leo Dion: Probably something like wits, I would assume.
[00:19:51] Alaina Kafkes (guest): yeah, it's very vigi, very widget like.
[00:19:54] Leo Dion: Would make sense.
[00:19:55] Alaina Kafkes (guest): yeah, I think in terms of, of other, other components that I think are worth knowing about there is this concept of an app shortcut, which is.
[00:20:06] Alaina Kafkes (guest): Distinct from an app intent. So like, sounds extremely confusing, but App shortcut is just like a way of making your app intent something that the shortcuts app can access. Like, I know it sounds like very silly when I, when I say it right now, but yeah.
[00:20:23] Leo Dion: No, but it makes total sense. It makes total sense.
[00:20:25] Leo Dion: Is there anything you have to do with like, in like the info p list or in the app settings to get this going and get it started?
[00:20:33] Alaina Kafkes (guest): Good question. Oh yes. You mentioned the app delegate as well. No, actually unlike I believe with Siri Kit, you do have to add this to, I don't know if it was the info p list or somewhere, some sort of more like app upsetting situation.
[00:20:48] Leo Dion: Yeah. So you just, you, you add the app intent to your application just by implementing a specific protocol and that's it.
[00:20:58] Alaina Kafkes (guest): Yes.
[00:20:59] Leo Dion: Wow. That's awesome. Okay.
[00:21:01] Alaina Kafkes (guest): Yeah. No, it is very nice. App intent is a protocol. Like, I didn't say that when I was trying to come up with like how to like precisely define it earlier, but yes, app intent is a protocol and you just like. Make something that conforms to that protocol that does an action within your app.
[00:21:18] Leo Dion: And then it just tells the OS Hey, this is, these are the things I can do. Okay. That's awesome.
[00:21:24] Multiplatform and Last Thoughts
---
[00:21:24] Leo Dion: Did you do, so Calm is also a watch app. W was there any difficulties or how did that work? As far as the watch app and app intents? Did you have app intent for the watch and the phone, or what was the relationship there?
[00:21:40] Alaina Kafkes (guest): Great question. So I only implemented app intense on the phone, not on the watch. I actually did work on the Apple Watch app, though. That was like a whole other project. A whole other
[00:21:50] Leo Dion: Congratulations. Welcome to the, to the Club of watchOS to app developers. Yeah.
[00:21:55] Alaina Kafkes (guest): Yes, yes. It was a wild time, but a different story.
[00:21:59] Leo Dion: Yeah. Was this, sorry, was this watch kit or was this swift ui?
[00:22:04] Alaina Kafkes (guest): It was Swift ui, so we had a watch kit app and I, I converted it to Swift ui and that was a, yeah, another project. Yeah.
[00:22:12] Leo Dion: Yeah. Cool. I was gonna ask if you know anything about multi-platform support when it comes to app intents. I don't know if you know anything about that. 'cause
[00:22:21] Leo Dion: you did some watch stuff. Do you know?
[00:22:24] Alaina Kafkes (guest): do not, sadly, I know that Siri kit. I feel like I remember seeing a ww DC talk some years ago about Siri kit and multi-platform intents. But I don't know if I ever saw that in the app intent like documentation or the ww DC videos I watched. Like, but that doesn't mean that you can't do it. It just means that I don't know how, haven't been exposed to how, yeah.
[00:22:49] Leo Dion: yeah. Fair enough. Was there anything else you wanted to mention about app intents or the work you're doing at Calm right now
[00:22:57] Alaina Kafkes (guest): That is a, that's a good question. I will say that even though there were like a lot of struggles that I encountered while working on this app intense project, we actually did see some like uptick in user engagement. So you could say that it was worth it.
[00:23:12] Leo Dion: Yeah, that sounds like it. Totally. Would you, if you were gonna build an indie app, what would be your decision process? A, would you just say, yeah, definitely doing app intense, or would there be some like decision process where like, eh, I don't know if this is really worthwhile. I.
[00:23:28] Alaina Kafkes (guest): no. Great. Great question. I feel like to me, app tense aren't necessary unless you can imagine like a strong use case for your app via something like Siri. Or like to your point about spotlight and like those suggestions being meaningful, if you feel like that would be meaningful, then you should go for it.
[00:23:51] Alaina Kafkes (guest): I think that the accessibility case that I made earlier can also be compelling. It just very much depends on the context of like your app and your, your user base or your, you're hoped for user base.
[00:24:05] Leo Dion: Okay. Fair enough. Elena, thank you so much for coming on. This was awesome. Where can people find you online?
[00:24:12] Alaina Kafkes (guest): Yeah, great question. I can be found on Twitter at Elena Kafkas. I will say that I'm currently locked out of my Twitter account. Don't know why, so I gotta resolve that. But if you, if you, if that is an issue and you still need to contact me, you can find me on LinkedIn if you would like.
[00:24:29] Leo Dion: Awesome. Elena, thank you so much for coming on. I really appreciate it.
[00:24:34] Alaina Kafkes (guest): Yay. Thank you, Leo. It's been, it's been cool, like the good refresher on the work that I did and like, oh, like I feel like talking about things and talking about things again, always increases my own understanding of them too. So useful for me as well.
[00:24:49] Leo Dion: Yeah. People can find me online on Twitter or X or whatever it's called at Leo Dion. My company is Bright Digit. I'm on Mastodon as well at Leo Dion at C dot. Im consider supporting the podcast and the YouTube channel. We have our Patreon account, so definitely check that out.
[00:25:07] Leo Dion: patreon.com/bright digit. And if you saw this on YouTube, please go ahead and like, and subscribe or. Give us a review. If there's something you want to talk about, are you gonna be speaking at a conference or anything, just reach out to me. I'd love to have you on the podcast. Thank you so much and I look forward to talking to you again.
[00:25:26] Leo Dion: Bye everybody.