Empower Apps

In this episode, Leo goes over what he's working on this Summer of WWDC 2023 such as deep diving into watchOS 10 for Heartwitch, migrating from Combine to Observation in Bushel, and really taking advantage of a microapps architecture.

Related Episodes

Related Links

We talked about 

  • (00:00) - WWDC 2023 Stuff
  • (03:02) - Playing around with watchOS 10
  • (06:54) - Bushel and WWDC 2023
  • (08:32) - Swift Observation
  • (09:56) - Macros Macrons Macaroons Macros
  • (13:39) - Microapps and Bushel
  • (15:50) - Final Thoughts

Social Media

Twitter Leo - @leogdion
Twitter BrightDigit - @brightdigit
LinkedIn - @leogdion
GitHub - @brightdigit
GitHub - @leogdion
TikTok - @brightdigit
Mastodon - @leogdion@c.im
Youtube - @brightdigit

Credits

Music from https://filmmusic.io
"Blippy Trance" by Kevin MacLeod (https://incompetech.com)
License: CC BY (http://creativecommons.org/licenses/by/4.0/)
Thanks to our monthly supporters
  • Holly Borla
  • Bertram Eber
  • Edward Sanchez
  • Satoshi Mitsumori
  • Steven Lipton
★ Support this podcast on Patreon ★

Creators & Guests

Host
Leo Dion
Swift developer for Apple devices and more; Founder of BrightDigit; husband and father of 6 adorable kids

What is Empower Apps?

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.

Hey everyone.

Welcome to another
episode of empower apps.

I'm your host, Leo Dion figured it's that
time of the year for me to give an update

on how things are going and I wanted
an opportunity to just talk about some

of the stuff I've been working on post
WWDC and what are my thoughts on just

working on some of these APIs, hands on
as I'm working on some of these projects.

So, if you don't know, I've gone
whole hog as far as all the depth

of DC stuff, except for, you know, I
don't have a vision pro and I haven't

done any vision pro development.

So if you're looking for that.

Sorry, I'm not going to mention that in
this episode because I just haven't had

the chance, but I've installed Sonoma
on my two Macs one, one accidentally

and the other one on purpose.

I bought the new MacBook Air 15 inch.

I should show that to you.

I just put a cover on it today, so
I'm super happy about it without

the cover, it's just an amazing.

Piece of flat metal.

I love carrying it everywhere.

I love the size on it.

Now that I have a cover on
it, I can put stickers on it.

So if you have any stickers
you want to send me, please do.

I'll take them.

DM me after the show
and I can send you my P.

O.

box or you can send it
to the BrightDigit P.

O.

box.

Which is on the BrightDigit website.

So, I'd love to have more
stickers on this thing.

So, please send them to me.

So, yeah, I've installed Sonoma.

And I think like the first
beta was really good.

But it was a misnomer
because, or not a misnomer.

What's the term I want to use?

It was not the way.

Each beta has been, each beta
has been like a roulette wheel.

I feel like each one has been
different and special in its own way.

And like I've had, I had some issues,
I think with the first or second

beta where the computer would just
crash and freeze or just slow down

and then the display would start
acting wonky and then later betas.

Now it's been more just a bunch
of apps closing specifically

I'm talking about like, like.

In a row, you'll get Safari and
Xcode and Final Cut and a couple

other Apple apps that will just
close on you out of nowhere.

It's super weird.

Luckily, it hasn't been so bad that
I felt like, oh man, I lost my data.

Like, that's not the case at all.

It's just more you know,
oh, well, I just restart it.

So it isn't a big deal really.

I have installed iOS 17.

Don't really notice
anything as far as that.

I'm sure I'm missing something.

I definitely can tell my iPhone 11
pro max is starting to show its age.

So yeah, I'm looking forward
to getting a new one this fall.

So we'll see about that.

I really like Sonoma other
than the crashing issue.

I love the desktop widgets.

It's awesome.

I love but that to me is the biggest
thing I've noticed that I really like.

But.

Primarily, I wanted to work on watchOS
10 because I was just interested if

you watched my episode with Hidde,
you probably, we talked extensively.

If you watched my episode with
Hidde, you probably saw that, you

know, I'm geeked about watchOS 10
and all the cool stuff you can do.

So I've been definitely
playing around with that.

And I installed that on the cheapo
scratch up watch I bought on eBay.

Speaking of which, hey so.

If you watch the episode, you know, I
sold, I don't know if I told you this,

but I sold my broken watch on eBay.

The one that just didn't
boot up and power down.

And somebody bought it and they
were actually able to replace

the battery and get it working,
which, you know, good for them.

That's what I say.

And we figured out a way to, cause
I couldn't I cloud unlock it.

The way I had to do that was you
can do it through login to the

website and then removing it there.

And, then I had the person
basically reset the watch.

There's a way to do that using
a certain button combination.

And then from there they were able,
they now have a brand new watch that

they bought for pretty discounted price.

So good for them.

And then of course going back to
development, a lot of Xcode 15, like, so

you can only install Xcode 15 on Sonoma.

There is a way to do Xcode 14 on Sonoma.

If I have any work, that's going to
demand it, which is probably going to

happen because that's the real world.

But There is a way to do that.

I can put it in the show notes that
pretty much with every new Mac OS version,

there's a way you can run the command of
Xcode in a terminal, open Xcode for you.

So, yeah, let's talk a little
bit about the Apple watch.

So I've been playing around with,
My, the scratch up series five

that I installed the beta on.

And it's I've been, I like watchOS 10 a
lot, but it definitely takes some getting

used to, and it's a little bit difficult.

It's a little bit difficult
switching between my two watches.

So I have a series seven, a large
size series seven and the smaller

series five, which has the beta.

So the series seven has watchOS
9 and it just takes, it's like.

There's so much muscle memory and how I do
things with watchOS for the last few years

that switching to watchOS 10, there's just
been so many changes with what the side

button does, and the crown does, and how
apps work, etc, and the way you bring up

control centers change, all that stuff.

And so that's really that's
something I have to get used to.

And it's especially challenging when
I'm switching between the two watches

every now and then, as far as app
development is concerned, I really wanted

to really take animations to the next
level particularly in a heart twitch,

I have this cool animation I've been
working on where it shows the heart

rate using a graph and animations.

And I want to eventually
get that into the app.

Heart twitch is my, I would say ideal.

Like my go to watch app
that I've been working on.

And as far as that's concerned, a
lot of like simplification, better

onboarding that I want to work on.

I have a couple other apps
that I'm working on as well.

I'll get into some architecture ideas
that I had to, I'll get into that when

I talk about the other app, but there's
a couple of other apps up and working on

specifically I have a little app called
objective scene where I can basically,

so you can set up like activity rings
essentially for different things.

And you can, they can be manual stuff
that you click on and tap on and

say, Oh, I drank this much water.

It could be hooked up to health kit.

It could hook up to all sorts of
stats that you get on your phone.

So that way you can see how close you are
to getting goals using activity rings.

You just customize it.

It's not all based on just.

Calories and exercise, but you
can set up your own custom ones.

So that's something I want to play
around with and work on as well.

It's my first chance at really
deep diving into widgets and the

dynamic island and playing around
with animations and stuff like that.

So those, that's, those are my smaller
projects that, that I've been working

on and playing around with as far as iOS
17 and watchOS 10 and things like that.

So, yeah, the biggest focus though has
been an app I've been wanting to work on

for a while that I had been working on
and took some time off this year because I

was busy with some, you know, other work.

And that would be Bushel.

So let me talk a bit about how
Bushel has been going since WWDC.

So I really deep dived into
Bushel after WWDC, there's not a

lot of like new stuff in Bushel.

There's a couple of new APIs I really want
to take advantage of the you can now save

the virtual machine state and there's some
updates to the UI view or the should say

app kit view that you use to show Show
the virtual machine screen, the display.

But that really isn't the
bulk of it more or less.

I just regret having
supported Monterey, honestly.

And now I'm just building from the ground
up, but a lot of code is reusable, so it's

not the end of the world by any means.

But a lot of, cruft code in there.

So, so for instance, we just
talked about safe state.

I had a whole thing using NSFileVersion
for doing my own safe state.

And now I can, like, abandon that.

I will only be supporting, sorry, I
will only be supporting Sonoma with with

Bushel for now because I'll probably
take long enough that I don't need to.

But, yeah, so there's that.

There's the window management stuff.

There's a ton of window management
stuff that they added in Ventura

that I couldn't take advantage of
because I was supporting Monterey.

I just, I regret it so much.

So, like, there's just a
ton of code I could rip out.

That I don't need anymore that
I'm really happy about being

able to rip that code out.

So that's the background on Bushel.

I'll get a little bit more into the
architecture later, but I wanted

to talk some about some of the new
APIs that have come out from WWDC.

With Bushel, I did a lot
of stuff with Combine.

As you may imagine, I'm a big Combine
fan, and as we all know, we have the new

Observation framework, so I really want
to take advantage of that, and honestly, I

don't want to do any Combine in this app.

I want it to be future proof.

I mean, I think Combine will be around
for a while, but Apple really pushed

Observation, so I should really be
using it, and so that's what I've done,

and I'm really trying to depend only
on Observation as much as possible.

There.

Do I miss combine?

Am I sad that it's going away?

Yeah.

In a lot of ways, there's a lot of
cool things you could do with reactive

programming that I'm afraid we're
going to lose out on wondering really

about the testability of observation.

I haven't gotten that far yet because I
just want to get functionality working.

But yeah.

Yeah, that's some of
the stuff I've run into.

This is a classic example
too of like, am I, is it me?

Am I crazy or do I just
not know what I'm doing?

But there's a whole observation
tracking that just isn't working

the way I thought it does.

And I'm a little bit intimidated to
actually use it because I'm not sure that

it's working the way it's supposed to.

So.

That has me a little bit worried, like
how am I supposed to track changes?

I don't want to have everything dependent
on the view doing like on change.

I want the machine, I want the
object to take care of it itself.

So I'm a little bit worried about that
as far as observation is concerned.

Next, I want to talk about macros.

I like macros.

I think they're great, but
there's some really weird

stuff that happens with macros.

So for instance, the
Sunday before dub dub.

I don't know if you heard this, but
I created an enum called preview.

The next day we get a macro called preview
and I didn't know this, but I started

trying to use the new API and it says
I had some weird error with previews.

I forgot what it does.

I'll hopefully put it on here somewhere.

And it ends up being that you
can run into name conflicts.

If you have a type.

With the same name as a macro that
seems like an oversight and a bug.

I did file a feed feedback for it.

So that's really weird.

There's some stuff with when I
use any like Swift attributes

with a macro, it throws thing off.

So I tried to like deprecate something
that was, Oh gosh, what was it?

Was it an attribute, a SwiftData
attribute or something?

I tried to deprecate it.

Or maybe it was the observation thing
that I tried to deprecate and it like

threw it off because it was like, I
didn't know how to deal with attribute

and the macro at the same time.

So that's about it.

I am trying very hard to avoid
getting down the rabbit hole

of like making my own macro.

I just don't want to go
down that rabbit hole.

I just want to make an app that
people can use and not just...

You know, the thing with, I
want to build a developer tool.

It's like, like, Oh, I can
make this swift package for me.

No, no, no, not going to do that.

Let's just use macros as a
user developer user, I guess.

And not go down that rabbit hole.

So, so far so good.

There's weirdness.

And that, that kind of gets to
my next thing I want to talk

about, which is SwiftData.

I've been avoiding core
data all these years.

I've used core data professionally, so
it's not like I don't know how it works

or I don't like it or anything like that.

I'm not that person at all.

I don't want to get into SQLite if
I don't need to, things like that.

So, but I also don't want
to maintain an old thing.

So I've been avoiding core data as much
as I can, unless I need to, but I've

been really deep diving into SwiftData.

I think SwiftData is a.

Thing I've been waiting for
to use in Bushel quite a bit.

So what use it for is essentially
keeping a database of every

image and machine that you have.

So that way you can easily
like create a new machine

based on a specific image file.

Or you can pull up a
list of your machines.

And you don't have to go and
specifically open that file, et cetera.

So SwiftData has been great.

Cause like when I was doing it, Bushel
talk about ripping out old code.

I was doing it all with user
defaults and it was a mess.

So I'm really happy to switch
over to SwiftData again.

Does it work the way it's supposed to?

Is it me?

I'm not totally sure.

I get some weird stuff with
like relationships and how with

relationships, even if I do a
delete, you can't set child.

Parent is null care.

Prader has some really great stuff.

I'm gonna post links to
some of her articles.

She's had some of the best SwiftData
stuff out there that's really helped me.

But yeah.

Oh, that goes to another thing
I've been super disappointed with.

I mean, I was going so fast in that
first beta and then once they broke

SwiftData and SwiftUI previews
at the same time, that just like

really slowed things down for me.

Man, I hope they get that fixed
soon because that really, that.

That sucks because I will I just Going
so fast i'm building stuff And moving

things along as far as using SwiftData
and swift ui previews at the same time.

It's been great.

Before I close out on SwiftData.

I just want to say if you're looking
for An app to like debug your

core data because it's essentially
still core data behind the scenes.

Take a look at a CoreDataLab.

It's a really great app.

I've been using that to
take a look at my data.

And that's been awesome.

Luckily, I've been employing if you
read my recent article on micro apps.

And if you watch the episode
I did with Majid, you probably

know I'm a big fan of modularity.

And so micro apps has been a
way for me to Breakdown Bushel

into it's into smaller pieces.

What I'm doing is I am using
a Swift package manager.

Like I said, I like to put all my code
in Swift package manager, and then I

will create a basically like I have
an app template in Xcode gen, and then

I use that template for building new.

for separate individual parts of Bushel.

So for instance, I have a library app.

It's not going to be posted to the app
store, but it's for me to just easily be

able to just test that section of the app.

Then I have a machine app and
then that tests just the machine

part of the app and so on.

And then I'm really going crazy with Swift
packages and like splitting things up.

Like there's separate view.

There's like separate views
for separate sections.

Like, sorry, separate targets for views.

There are separate targets for
views for machines or separate

targets for views for libraries.

There's core stuff.

There's SwiftData stuff in
individual SwiftData stuff for

the different sections of the app.

So I'm really trying to like break
this app apart into as small of a piece

as I can so that there is, and then
of course, doing that, like creating.

Dependencies in such a way
that that there's not too much

like tightly coupled stuff.

It's not just because in the future
I might do something else with it,

but it's just for easier testing,
easier maintenance, things like that.

That's why I'm a big fan of micro apps.

In a sense, it's a little bit
more difficult at macOS because

these apps tend to be bigger.

But if you're doing iOS, it
makes total sense as well.

And that's really one of the big pushes
I'm making with Bushel is just breaking

it into smaller pieces, hopefully maybe
someday making parts of it open source.

I mean, I even, I'm creating
a command line app as well.

So.

Yeah I'm just, I'm a
big fan of this concept.

I hope I'm doing it the right way.

I think I am.

And so far I'm loving it.

I think the interconnectivity, I need
to figure that out a little bit better.

Cause I've seen machines need
to know what OS are installing

based on the image and things like
that, but we'll get there soon.

So that's, that's pretty much it.

I'll put links to Bushel.

Of course, you can still
sign up for the beta.

As I get closer and closer to
finalizing it, I'll extend that, invite

more to people who have signed up.

But That's about it.

If you have any questions, send
me a message on Twitter, ask

it on, or you can email me.

But.

I also post a link or I'll post in the
show notes, the address to my PO box.

If you want to send me
stickers, I'd appreciate that.

But thank you so much for joining
me for this small little episode

that kind of gives you an update and
went up and play around with, like

I said, sorry, no vision pro stuff.

I'm sure I'll forget something
that I wanted to talk about.

But if you liked this video I hope
you enjoy the next one with Joannis.

We'll be talking about the Swift servers,
server side, Swift working group.

And of course I've got another episode
coming up with Matt who came on to

talk about the extension kit, which I
haven't even deep dive, but man, I'd

love to with Bushel and he'll be talking
about his talk from Swift Toronto.

He's of course of chime and.

So you can definitely check that out.

And then Brandon Williams from
point free, who's also going

to be speaking with Toronto.

We'll be on the show to
talk about dependency.

So I'm really curious to hear his
take on that and TCA of course.

And you can send me all those questions
if you want to and the world, et cetera.

So yeah, definitely take a look at that.

And that I do have an interview planned
with Christian Seelig of the formerly

Apollo and currently of Pixel Pals.

So we'll have some interesting
stuff to talk about there.

So thank you again for joining me and
I look forward to talking to you again.

Like, and subscribe please.

And give me a review.

Thanks everybody.

Bye.